12 February 2015

List of Installed Updates

Posted By: Mick Pletcher - 12:07 PM

Share

& Comment






This script will generate a clean list of Microsoft updates that were installed during a system build, making it drastically easier than having to parse through the log file. You open the powershell script up and update the $File variable to point to the location of the BDD.log file.

You can download the script from here.


 <#  
 .SYNOPSIS  
   Produce list of newly installed windows updates  
 .DESCRIPTION  
   Reads BDD.log file from a build and extracts the list of new updates  
   that were applied.  
 .Author  
   Mick Pletcher  
 .Date  
   12 February 2015  
 .EXAMPLE  
   powershell.exe -executionpolicy bypass -file UpdateList.ps1  
 #>  
   
 cls  
 $File = Get-Content -Path "C:\Users\Mick\Desktop\BDD.log" -Force  
 Foreach ($Entry in $File) {  
      If (($Entry -like '*INSTALL - *') -and ($Entry -like '*ZTIWindowsUpdate*')) {  
           #Write-Host $Entry  
           $SplitLine = $Entry.Split('KB')  
           $Update = $SplitLine[2]  
           $Update = $Update.Split(')')  
           $Update = $Update.Split('(')  
           Write-Host "KB"$Update[0]  
      }  
 }  
   
 Remove-Variable -Name Entry -Force  
 Remove-Variable -Name File -Force  
 Remove-Variable -Name Update -Force  

About Mick Pletcher

My blog is here to help solve issues I have encountered and solved, publish scripts I have written, and educate others in understanding areas that are not well covered

0 comments:

Post a Comment

Copyright © 2013 Mick's IT Blogs™ is a registered trademark.