From 5ff79098949347dd20a1dda01225c2c6d43af1be Mon Sep 17 00:00:00 2001 From: Freddy Kristiansen Date: Thu, 25 Apr 2024 10:26:16 +0200 Subject: [PATCH] no hardcoded serverinstance (#3512) Co-authored-by: freddydk --- ContainerInfo/Get-NavContainerServerConfiguration.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ContainerInfo/Get-NavContainerServerConfiguration.ps1 b/ContainerInfo/Get-NavContainerServerConfiguration.ps1 index 2f2065f22..788e70688 100644 --- a/ContainerInfo/Get-NavContainerServerConfiguration.ps1 +++ b/ContainerInfo/Get-NavContainerServerConfiguration.ps1 @@ -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