Forum Discussion
Alan2022
May 31, 2022Iron Contributor
Re: Run Windows Updates with Powershell Remotely
Hi dmarquesgn
I think the best approach in here is using WSUS in your Company.
So no need for PowerShell to do that.
I think the best approach in here is using WSUS in your Company.
So no need for PowerShell to do that.
3 Replies
- dmarquesgnIron ContributorThanks for the tip.
I would like to avoid WSUS, as it also has some challenges, and at the same time I would learn more on Powershell.
Meanwhile I was already able to use a command to update remotely, now I need to deal with errors and logging, which is not so good at the moment.
Set-Item WSMan:\localhost\Client\TrustedHosts –Value * -Force
$Script = {Get-WindowsUpdate -KBArticleID KB4535680 -AcceptAll -Install -Verbose | Out-File C:\Temp\PSWindowsUpdate.log}
Invoke-WUjob -ComputerName <computername> -Script $Script -Confirm:$false -RunNow- andrefilipe90Copper Contributor
great topic, would you mind sharing the code you got so far and some details of how it works?
cheers.
- dmarquesgnIron Contributor
Hi, how are you?
To be honest, I didn't developed much more on that, as we turned into a low cost but very effective tool for that goal, which was PDQ.