mgajda83 / PSWindowsUpdate

This module contain cmdlets to manage Windows Update Client.
MIT License
253 stars 24 forks source link

Having trouble with PSRemoting commands for PSWindowsUpdate #1

Closed aricade closed 8 months ago

aricade commented 2 years ago

The command seems to accept and download email but not install or autoreboot. If I run it directly from the console it does work though:

Invoke-Command -ComputerName $Server -ScriptBlock {Install-WindowsUpdate -Install -AcceptAll -SendReport -AutoReboot -SendHistory -ScheduleJob (get-date).AddMinutes(1) }

The issue may be in the way I am attempting to run it? Perhaps I am missing something?

You did an update today? What's new? Thanks for an awesome module you have my deepest gratitude & respect!

mgajda83 commented 2 years ago

Hi, Module cant be run remote session directly. It Windows Update API limitation. Try to use Invoke-WUJob. Cmdlet create a task in task scheduler on remote machine. Or just use -ComputerName param: Install-WindowsUpdate -ComputerName ws22.psmvp.org -KBArticleID KB890830

What's new? Nothing special, just fixed couple small bugs and typos. And new version is digitally signed. Its all.