Skip to content

Commit

Permalink
no hardcoded serverinstance (#3512)
Browse files Browse the repository at this point in the history
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
  • Loading branch information
freddydk and freddydk committed Apr 25, 2024
1 parent 83f0b87 commit 5ff7909
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ContainerInfo/Get-NavContainerServerConfiguration.ps1
Expand Up @@ -14,15 +14,15 @@ Function Get-BcContainerServerConfiguration {
)

Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock{ Param($ContainerName)
$config = Get-NAVServerConfiguration -serverinstance BC -AsXml
$Object = [ordered]@{ "ContainerName" = $ContainerName }
$config = Get-NavServerInstance | Get-NAVServerConfiguration -AsXml
$object = [ordered]@{ "ContainerName" = $ContainerName }
if ($config) {
$Config.configuration.appSettings.add | ForEach-Object{
$Object += @{ "$($_.Key)" = $_.Value }
$object += @{ "$($_.Key)" = $_.Value }
}
}
else {
$Object += @{ "ServerInstance" = "" }
$object += @{ "ServerInstance" = "" }
}
$object | ConvertTo-Json -Depth 99 -compress
} -argumentList $containerName | ConvertFrom-Json
Expand Down

0 comments on commit 5ff7909

Please sign in to comment.