Powershell Remote: Microsoft.Update.Session, Access Denied: 0x80070005

前端 未结 5 2104
面向向阳花
面向向阳花 2021-01-03 00:14

I\'ve written a script to search/download/install Windows Updates on a machine using the Microsoft.Update.Session COM Object. When run locally it works just fine, however wh

5条回答
  •  無奈伤痛
    2021-01-03 00:56

    Use PsExec (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) to remotely execute PowerShell with a script file:

    psexec -s \\remote-server-name C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe \\server\script.ps1
    

    I used the script detailed at http://www.ehow.com/how_8724332_use-powershell-run-windows-updates.html, and I can remotely execute it using psexec to download and install updates.

提交回复
热议问题