Ir al contenido principal

Entradas

Mostrando entradas de julio, 2017

PowerShell script to list all installed Microsoft Windows Updates

Fuente: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-script-to-list-0955fe87 Why use this script? The PowerShell cmdlet 'get-hotfix' sometimes does not draw-out 'installedon' information. win32-Quickfixengineering class does not have that information either. What does this script offer? The above void can be filled by using the good old 'wmic qfe list' command. But, the output of the legacy command is mere text and cannot be easily interrogated like objects in PowerShell.  The attached script converts the output string of 'wmic qfe list' command into versatile PowerShell objects, which can be used within other scripts. Note:  Do not forget to include the attached powershell script. The below POSH oneliner lists all updates installed in the last 2 days and tabulates properties: Computername, KBArticle,InstalledOn, HotFixID and InstalledBy. PowerShell Get - MSHotfix | Where - Object { $_ .Installedon  - gt (( Get