Find patch from SYSTEMINFO output using PoSH

Posted on 2012-08-15
Last Modified: 2012-08-16

If I go to Windows Powershell and type SYSTEMINFO, I am listed the patches/hotfixes installed on my machine (amongst other things).

For instance:

 [174]: KB980232
 [175]: KB980396
 [176]: KB980408
 [177]: KB980846
 [178]: KB981013
 [179]: KB981332
 [180]: KB981852
 [181]: KB981889
 [182]: KB982018

I would like a Powershell command that will search the above and tell me if a certain entry exists (e.g. KB982018). I'm not sure if this is possible though.
Question by:richlionel
    LVL 3

    Expert Comment

    $STORE -match "KB982018"

    If this KB value is there in SystemInfo, that entire line will be displayed, like:
    [55]: KB982018

    If this KB value is not there, there will be no output.
    LVL 6

    Accepted Solution

    Get-Hotfix | Where { $_.HotFixID -match "KB982018" }

    Open in new window

    LVL 9

    Expert Comment


    Author Comment

    Thanks all, slidingfox's answer is the exactly what I was looking for.

    Thanks to everyone else.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
    This tutorial will show how to inventory, catalog, and restore media from legacy versions of Backup Exec into both 2012 and 2014 versions of the software. Select Storage from the tabs along the ribbon bar as the top: Ensure the proper storage devi…
    This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now