functions/Import-BcManagement.ps1

function Import-BcManagement
{
    [CmdletBinding()]
    param (
        [Parameter()]
        [int]$MajorVersion
    )

    $BcManagementPath = (Join-Path (Get-BcInstallationProperty -MajorVersion $MajorVersion -Component Service).Path 'Management')
    Import-Module (Join-Path $BcManagementPath 'NAVWebClientManagement.psm1')
    Import-Module (Join-Path $BcManagementPath 'Microsoft.Dynamics.Nav.Management.dll') -NoClobber
}