Skip to content

Commit

Permalink
Update-ServiceStatus - fix cross-domain issue by changing ComputerNam…
Browse files Browse the repository at this point in the history
…e to PSComputerName (#9288)
  • Loading branch information
fuixx217 authored Mar 27, 2024
1 parent 52c23bb commit 545e254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions private/functions/Update-ServiceStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '"
Expand Down Expand Up @@ -223,4 +223,4 @@ process {
}
end {
}
}
}

0 comments on commit 545e254

Please sign in to comment.