我想通过PowerShell安装某些Windows更新,因为我需要修补的计算机数量。通过Powershell推送Windows更新
我使用以下语法;
enter-pssession PCname-PC
一旦会话连接,我使用以下;
wusa.exe c:\temp\update.msu /quiet /norestart /log:C:\wusa.log
手头的问题是没有任何反应,我每次都收到拒绝访问。 Powershell作为管理员运行,本地计算机用户是管理员。我曾尝试运行一个脚本,允许会话以域管理员身份进行连接,并获得相同的结果。
任何帮助在这个问题将不胜感激。谢谢
或者你可以试试这个:$ PC =“PC “[wmiclass]”\\ $ pc \ root \ cimv2“$ comm =”cmd/c wusa.exe c:\ temp \ update.msu/quiet/norestart /log:C:\wusa.log“ :Win32_Process“)。create($ comm)' – Vitaly
或者你可以尝试使用credentional参数:'Enter-PSSession -ComputerName PC1 -Credential contoso \ administrator' – Vitaly
S Windows版本阻止您写入C:\驱动器的根目录。尝试更改/登录到另一个目录。 –