Skip to content

Commit

Permalink
Adding credentials to the Get-DbaCmObject call in Test-PendingReboot (#…
Browse files Browse the repository at this point in the history
…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 d8021b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/functions/Test-PendingReboot.ps1
Expand Up @@ -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) {
Expand All @@ -55,4 +55,4 @@ function Test-PendingReboot {
}
return $false
}
}
}

0 comments on commit d8021b7

Please sign in to comment.