If you're on ConfigMgr 2012, I did something like this recently through the
new app model.

 

http://t3chn1ck.wordpress.com/2013/06/18/deploying-microsoft-hotfixes-via-th
e-configmgr-2012-app-model/ 

 

Nick | http://t3chn1ck.wordpress.com

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Daniel Ratliff
Sent: Wednesday, August 7, 2013 8:47 AM
To: [email protected]
Subject: [mssms] RE: Query specific installed updates

 

Got PowerShell 3.0 on Win7? Use get-hotfix. 

 

Worst case you can use the old deprecated wmic qfe get

 

Daniel Ratliff 

 

From: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Beardsley, James
Sent: Wednesday, August 07, 2013 10:30 AM
To: [email protected] <mailto:[email protected]> 
Subject: [mssms] Query specific installed updates

 

What's the best method of querying the list of all installed updates (all
updates that show up in the Control Panel UI)? I want to create a
configuration item to either use Powershell or WMI to check if a particular
Lync update (KB2842627) is installed. On my test machine which has it
installed, when I look at Installed Updates through Control Panel, it lists
5 Lync updates including the one I'm looking for. 

 



 

However, if I run the following Powershell script (I found it online and
modified it to only show Lync updates) on that same computer, I don't get
the results I'm expecting. It only returns 1 Lync update (Security Update
for Lync 2010 X64 (KB2843160) | MS13-054). I'm trying to figure out why it
would show one but not the others? If there's a better way to obtain that
information programmatically, I'm open to suggestions.

 

Function Get-InstalledUpdates($title) {

    $UpdateSession = New-Object -ComObject Microsoft.Update.Session 

    $SearchResult = $null

    $UpdateSearcher = $UpdateSession.CreateUpdateSearcher()

    $UpdateSearcher.Online = $true

    $SearchResult = $UpdateSearcher.Search("IsInstalled=1 and
Type='Software'") 

 

    $i = 1

    foreach($Update in $SearchResult.Updates)

    {

          If ($Update.Title -like "*$title*") {

        Write-Host "$i) $($Update.Title + " | " +
$Update.SecurityBulletinIDs)"

        $i += 1

        }

    }

}

 

cls

 

Get-InstalledUpdates("Lync")

 

Thanks!

  _____  

IRS Compliance: Any tax advice contained in this communication (including
any attachments) is not intended or written to be used, and cannot be used,
for the purpose of (i) avoiding penalties imposed under the Internal Revenue
Code or applicable state or local tax law or (ii) promoting, marketing, or
recommending to another party any transaction or matter addressed herein.

  _____  

Confidentiality Notice: This e-mail is intended only for the addressee named
above. It contains information that is privileged, confidential or otherwise
protected from use and disclosure. If you are not the intended recipient,
you are hereby notified that any review, disclosure, copying, or
dissemination of this transmission, or taking of any action in reliance on
its contents, or other use is strictly prohibited. If you have received this
transmission in error, please reply to the sender listed above immediately
and permanently delete this message from your inbox. Thank you for your
cooperation.

 


The information transmitted is intended only for the person or entity to
which it is addressed
and may contain CONFIDENTIAL material. If you receive this
material/information in error,
please contact the sender and delete or destroy the material/information.

 



<<image001.png>>

Reply via email to