![]() I also wanted to give you some information that greatly helped me: NOTE: Wildcards can be used in computer name Please remember, the computer you are running the above scrip from needs to trust the computer you are trying to update, you can run this script to trust the computer: Set-Item WSMan:\localhost\Client\TrustedHosts -Value PSWindowsUpdate is by far the best library for this job, and although its been a long process for me, I believe the above solution will work for everyone. There is a lot of scattered information on this topic, so please do your reading. Invoke-Command -Session $Session -ScriptBlock $ -Confirm:$false -Verbose -RunNow $Session = New-PSSession -ComputerName $IPaddress -Credential $cred ![]() $cred = New-Object ("Admin02", $secpasswd) $secpasswd = ConvertTo-SecureString -AsPlainText -Force ![]() I have the below script to do the same remotely: param( When i run this function on a local host, the function is successful in installing windows security patches. Install-Module -Name PSWindowsUpdate -RequiredVersion 2.1.0.1 -Force This is the function i am using to Update windows I am trying to Install windows security patches on a remote machine using powershell remoting.
0 Comments
Leave a Reply. |