BRONZE PARTNER:
BRONZE PARTNER:
Industry News:

| |
 |
 |
 |
| PowerShell script to check when the computer was last patched (Using Windows Update Agent API) |
 |
|
|
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.
|
 |
 |
 |
|
|