Grab our RSS feeds Follow us on Twitter Join our Facebook Group Connect with us on LinkedIn
myITforum.com, Powered by You.
you are not logged in

Articles

Newslinks

Links

Downloads

Site Services

Community Forums

Discussion Lists

Article Search

Newsletter

Web Blogs

FAQs

Live Support

myITforum TV

Take a Poll

Monthly Drawing

myITforum Network

User Group Directory

Our Partners

About Us

Register

Login

BRONZE PARTNER:

BRONZE PARTNER:



Industry News:




  Home : Articles : Windows PowerShell print | email | | Forums |   print | email | | Blogs |   print | email | | Wiki |   print | email | | FAQs |   print | email | Article Search  
PowerShell script to check when the computer was last patched (Using Windows Update Agent API)


Bookmark and Share

By: Ying Li
Posted On: 6/4/2007

Here is a small PS script to check when the target computer was last patched and what patch was installed.

This article was Previously posted on Ying Li's Blog

$objSession = New-Object -com "Microsoft.Update.Session"

$objSearcher= $objSession.CreateUpdateSearcher()

$colHistory = $objSearcher.QueryHistory(1, 1)

Foreach($objEntry in $colHistory)
{
Write-host $objEntry.Title
Write-host $objEntry.Date
}


Unfortunately this doesn’t work on remote computer. (It can work on remote computer if using VBS). I am trying to figure out a way to use .NET or remote registry to do the same for remote computer without success so far.

  myITforum.com ©2010 | Legal | Privacy