Im trying to install in a remote server, updates approved in our Wsus:
$session=New-PSSession -ComputerName server1
Invoke-Command -Session $session -ScriptBlock {
(Import-module -name "S:\temp\PSWindowsUpdate" -Verbose),
(Get-WindowsUpdate | Format-Table -Verbose)
Enable-WURemoting
(Install-module pswindowsupdate -force -Accept -SkipPublisherCheck -AllowClobber),
(Get-WUInstall -AcceptAll -AutoReboot -Verbose)}
But i get this access denied error:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) + CategoryInfo : NotSpecified: (:) [Get-WindowsUpdate], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,PSWindowsUpdate.GetWindowsUpdate + PSComputerName : server1
I am administrator of the remote server.
Its not possible launch de updates installation on remote servers?
Thanks,