Skip to content
Permalink
Browse files

Adding credentials to the Get-DbaCmObject call in Test-PendingReboot (#…

…6081)

* Adding credentials to the Get-DbaCmObject call
* param order
  • Loading branch information...
nvarscar authored and wsmelton committed Oct 2, 2019
1 parent 561d8be commit d8021b774af7eb20300c90d47c0aa191b61dfde7
Showing with 2 additions and 2 deletions.
  1. +2 −2 internal/functions/Test-PendingReboot.ps1
@@ -29,7 +29,7 @@ function Test-PendingReboot {
$icmParams.Credential = $Credential
}

$OperatingSystem = Get-DbaCmObject -ComputerName $ComputerName.ComputerName -ClassName Win32_OperatingSystem -EnableException
$OperatingSystem = Get-DbaCmObject -ComputerName $ComputerName.ComputerName -Credential $Credential -ClassName Win32_OperatingSystem -EnableException

# If Vista/2008 & Above query the CBS Reg Key
If ($OperatingSystem.BuildNumber -ge 6001) {
@@ -55,4 +55,4 @@ function Test-PendingReboot {
}
return $false
}
}
}

0 comments on commit d8021b7

Please sign in to comment.
You can’t perform that action at this time.