<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use PowerShell to Find Missing Updates on WSUS Client Computers</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/19/use-powershell-to-find-missing-updates-on-wsus-client-computers.aspx</link><description>Learn how to use the computer target scope with Windows PowerShell to find WSUS client computers that are missing updates.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Use PowerShell to Find Missing Updates on WSUS Client Computers</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/19/use-powershell-to-find-missing-updates-on-wsus-client-computers.aspx#3478762</link><pubDate>Fri, 03 Feb 2012 13:49:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3478762</guid><dc:creator>Boe Prox</dc:creator><description>&lt;p&gt;This can be done by first using my previous post here to filter for only servers and collecting the GUID of each computer (ID property). Then, using the article where I talk about using the GetSummariesPerComputerTarget() method, we can generate the update summary and begin filtering out non servers by checking it against our collection of servers. This should give you what you are looking for.&lt;/p&gt;
&lt;p&gt;#Load assemblies&lt;/p&gt;
&lt;p&gt;[void][system.reflection.assembly]::LoadWithPartialName(&amp;#39;Microsoft.UpdateServices.Administration&amp;#39;)&lt;/p&gt;
&lt;p&gt;#Connect to WSUS&lt;/p&gt;
&lt;p&gt;$Global:wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer(&amp;#39;j23&amp;#39;,$False)&lt;/p&gt;
&lt;p&gt;#Create Scope objects&lt;/p&gt;
&lt;p&gt;$computerscope = New-Object Microsoft.UpdateServices.Administration.ComputerTargetScope&lt;/p&gt;
&lt;p&gt;$updatescope = New-Object Microsoft.UpdateServices.Administration.UpdateScope&lt;/p&gt;
&lt;p&gt;#Gather only servers&lt;/p&gt;
&lt;p&gt;$ServersId = @($wsus.GetComputerTargets($computerscope) | Where {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$_.OSDescription -like &amp;quot;*Server*&amp;quot;&lt;/p&gt;
&lt;p&gt;} | Select -expand Id)&lt;/p&gt;
&lt;p&gt;#Get Update Summary&lt;/p&gt;
&lt;p&gt;$wsus.GetSummariesPerComputerTarget($updatescope,$computerscope) | Where {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;#Filter out non servers&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$ServersId -Contains $_.ComputerTargetID&lt;/p&gt;
&lt;p&gt;} | ForEach {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;New-Object PSObject -Property @{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ComputerTarget = ($wsus.GetComputerTarget([guid]$_.ComputerTargetId)).FullDomainName&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NeededCount = ($_.DownloadedCount + $_.NotInstalledCount)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DownloadedCount = $_.DownloadedCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotApplicableCount = $_.NotApplicableCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotInstalledCount = $_.NotInstalledCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InstalledCount = $_.InstalledCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FailedCount = $_.FailedCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Hope this helps...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3478762" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Find Missing Updates on WSUS Client Computers</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/19/use-powershell-to-find-missing-updates-on-wsus-client-computers.aspx#3478508</link><pubDate>Thu, 02 Feb 2012 13:09:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3478508</guid><dc:creator>Davy</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;What I wanted to achive is that I could get a list of our servers that have updates waiting and the number of updates.&lt;/p&gt;
&lt;p&gt;But I can&amp;#39;t seem to get it done.&lt;/p&gt;
&lt;p&gt;Any tips?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3478508" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Find Missing Updates on WSUS Client Computers</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/19/use-powershell-to-find-missing-updates-on-wsus-client-computers.aspx#3477091</link><pubDate>Wed, 25 Jan 2012 01:43:21 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3477091</guid><dc:creator>Boe Prox</dc:creator><description>&lt;p&gt;Hi Davy,&lt;/p&gt;
&lt;p&gt;Glad you have enjoyed my series on WSUS! Unfortunately, the ComputerScope does not lend itself very well to identifying only servers in WSUS, you would have better luck with using a generic search and filter by OSDescription. &lt;/p&gt;
&lt;p&gt;$wsus.GetComputerTargets() | Where {$_.OSDescription -like &amp;quot;*server*&amp;quot;}&lt;/p&gt;
&lt;p&gt;Or if you have Target Groups with a name containing server, for example:&lt;/p&gt;
&lt;p&gt;$wsus.GetComputerTargetGroups() | Where {$_.name -Like &amp;#39;*Server*&amp;#39;} | ForEach {$_.GetComputerTargets()}&lt;/p&gt;
&lt;p&gt;Hope this helps...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3477091" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Find Missing Updates on WSUS Client Computers</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/19/use-powershell-to-find-missing-updates-on-wsus-client-computers.aspx#3476944</link><pubDate>Tue, 24 Jan 2012 13:23:59 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3476944</guid><dc:creator>Davy</dc:creator><description>&lt;p&gt;Hi Boe,&lt;/p&gt;
&lt;p&gt;Thumbs up for the great blogs!&lt;/p&gt;
&lt;p&gt;Is it possible that the computerscope only contains servers? What command would get that result?&lt;/p&gt;
&lt;p&gt;Tnx&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3476944" width="1" height="1"&gt;</description></item></channel></rss>