您可以使用 ManageTime 方法遠端取得 Windows 系統的系統時間值。例如:
在命令列介面中,執行下列命令:
-
$cred = Get-Credential
-
$session = New-CimSession -ComputerName "Server01"
-Credential $cred
-
Get-CimInstance -CimSession $session -Namespace
root\dcim\sysman -ClassName DCIM_TimeService | Invoke-CimMethod -MethodName
ManageTime -Arguments @{GetRequest="TRUE"}