Skip to content

Commit 5ff7909

Browse files
authored
no hardcoded serverinstance (#3512)
Co-authored-by: freddydk <[email protected]>
1 parent 83f0b87 commit 5ff7909

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ContainerInfo/Get-NavContainerServerConfiguration.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Function Get-BcContainerServerConfiguration {
1414
)
1515

1616
Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock{ Param($ContainerName)
17-
$config = Get-NAVServerConfiguration -serverinstance BC -AsXml
18-
$Object = [ordered]@{ "ContainerName" = $ContainerName }
17+
$config = Get-NavServerInstance | Get-NAVServerConfiguration -AsXml
18+
$object = [ordered]@{ "ContainerName" = $ContainerName }
1919
if ($config) {
2020
$Config.configuration.appSettings.add | ForEach-Object{
21-
$Object += @{ "$($_.Key)" = $_.Value }
21+
$object += @{ "$($_.Key)" = $_.Value }
2222
}
2323
}
2424
else {
25-
$Object += @{ "ServerInstance" = "" }
25+
$object += @{ "ServerInstance" = "" }
2626
}
2727
$object | ConvertTo-Json -Depth 99 -compress
2828
} -argumentList $containerName | ConvertFrom-Json

0 commit comments

Comments
 (0)