Containers/Enable-SymbolLoading.ps1
<# .Synopsis Enables symbol loading in container .Description Enables symbol loading in container .Parameter ContainerName Name of the container. Can be provided in the settings.json .Parameter SourcePath Path to the current project .Example Enables-SymbolLoading #> function Enable-SymbolLoading { Param( [Parameter(Mandatory=$false)] $ContainerName = "", [Parameter(Mandatory=$false)] $SourcePath = (Get-Location) ) $ContainerName = Get-NewContainerName -SourcePath $SourcePath -ContainerName $ContainerName $platform = Get-PlatformFromContainer -ContainerName $ContainerName if ($platform.Major -ne 11 -and $platform.Major -ne 14) { throw "You can only enable symbols for NAV 2018 or BC 14" } Invoke-ScriptInBcContainer -containerName $ContainerName -scriptblock { Set-NavServerConfiguration -ServerInstance NAV -KeyName 'EnableSymbolLoadingAtServerStartup' -KeyValue $true Set-NavServerInstance -ServerInstance NAV -Restart } } |