From 545e2540dc0bc51c4115d3729c82415005894e3f Mon Sep 17 00:00:00 2001 From: fuixx217 Date: Wed, 27 Mar 2024 05:49:59 -0400 Subject: [PATCH] Update-ServiceStatus - fix cross-domain issue by changing ComputerName to PSComputerName (#9288) --- private/functions/Update-ServiceStatus.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/private/functions/Update-ServiceStatus.ps1 b/private/functions/Update-ServiceStatus.ps1 index 7f74790f05..10b8ce3032 100644 --- a/private/functions/Update-ServiceStatus.ps1 +++ b/private/functions/Update-ServiceStatus.ps1 @@ -185,7 +185,7 @@ $errorCodes = Get-DbaServiceErrorMessage process { #Group services for each computer - $serviceComputerGroup = $InputObject | Group-Object -Property ComputerName + $serviceComputerGroup = $InputObject | Group-Object -Property PSComputerName foreach ($group in $serviceComputerGroup) { Write-Message -Message "Getting CIM objects from computer $($group.Name)" $serviceNames = $group.Group.ServiceName -join "' OR name = '" @@ -223,4 +223,4 @@ process { } end { } -} \ No newline at end of file +}