Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Listing Windows Updates by a Specific date using PowerShell

$
0
0

Create/update trouble tickets for updating servers.  I want to user PowerShell to get a list of the updates for a specific day.  

I've found some things that were close and came up with this:

$date = "1/21/2014"
$Session = New-Object -ComObject "Microsoft.Update.Session"
$Searcher = $Session.CreateUpdateSearcher()
$historyCount = $Searcher.GetTotalHistoryCount()
$Searcher.QueryHistory(0, $historyCount) | Where-Object {$_.Date -gt $date}  | Select-Object Title, Date > updates.txt

It works *but* the times are in GMT.  

How do I get them to print correctly?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>