Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Getting Windows update info dfrom Remote Server

$
0
0

Morning, 

  I have a script that gets windows update when run  locally. 

What i want to achieve is to run  this script remotely  on a number of servers and check for updates 

server1, server2 , server 3

************ Current SCript***********

                        

$session = New-Object -ComObject Microsoft.Update.Session            
$searcher = $session.CreateUpdateSearcher()            

$result = $searcher.Search("IsInstalled=0 and Type='Software' and ISHidden=0" )            

if ($result.Updates.Count -gt 0){            
 $result.Updates |             
 select Title, IsHidden, IsDownloaded, IsMandatory,             
 IsUninstallable, RebootRequired, Description            
}            
else {            
 Write-Host " No updates available"            
}

********************************

** i want to run this script against the (3) three servers.


Viewing all articles
Browse latest Browse all 21975

Trending Articles