Containers/Disable-SymbolLoading.ps1
<#
.Synopsis Disables symbol loading in container .Description Disables 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 Disable-SymbolLoading #> function Disable-SymbolLoading { Param( [Parameter(Mandatory=$false)] $ContainerName = "", [Parameter(Mandatory=$false)] $SourcePath = (Get-Location) ) if ($ContainerName -eq "") { $ContainerName = Get-ContainerFromLaunchJson } [version]$platform = Get-AppKeyValue -SourcePath $SourcePath -KeyName 'platform' if ($platform.Major -gt 11) { throw "You can only enable symbols for NAV 2018" } Invoke-ScriptInNavContainer -containerName $ContainerName -scriptblock { Set-NavServerConfiguration -ServerInstance NAV -KeyName 'EnableSymbolLoadingAtServerStartup' -KeyValue $false Set-NavServerInstance -ServerInstance NAV -Restart } } Export-ModuleMember Disable-SymbolLoading |