Get the default model used creating new projects in Visual Studio
        Get the registered default model that is used across all new projects that are created inside Visual Studio when working with D365FO project types
        PS C:\> Get-D365DefaultModelForNewProjects
        This will display the current default module registered in the "..Documents\Visual Studio 2015\Settings\DynamicsDevConfig.xml" file.
        Tag: Model, Models, Development, Default Model, Module, Project
        Author: Mötz Jensen (@Splaxi)
        The work for this cmdlet / function was inspired by Robin Kretzschmar (@DarkSmile92) blog post about changing the default model.
        The direct link for his blog post is:
        His main blog can found here:

function Get-D365DefaultModelForNewProjects {
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "")]
    param ()

    $filePath = "C:\Users\$env:UserName\Documents\Visual Studio 2015\Settings\DynamicsDevConfig.xml"

    if (-not (Test-PathExists -Path $filePath -Type Leaf)) { return }

    if (Test-PSFFunctionInterrupt) { return }

    $namespace = @{ns = "" }
    $defaultModel = Select-Xml -XPath "/ns:DynamicsDevConfig/ns:DefaultModelForNewProjects" -Path $filePath -Namespace $namespace

    $modelName = $defaultModel.Node.InnerText
    [PSCustomObject] @{DefaultModelForNewProjects = $modelName }