当我尝试使用以下代码行从远程计算机运行wuauclt / resetauthorization / detectnow时,客户端检测到0次更新(在日志文件中写入条目)。
$username = "uname"
$password = ConvertTo-SecureString "pass" -AsPlainText -Force
$cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
Invoke-command -Computer ComputerName -Credential $cred -Script {wuauclt /resetauthorization /detectnow}
但是,只要我在同一系统上手动运行它就会检测到更新。 什么可能导致此命令在远程调用时未检测到更新?