Looks like you are right, it doesn't pull 'everything'. What a shame. Daniel Ratliff
From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Beardsley, James Sent: Wednesday, August 07, 2013 12:29 PM To: mssms@lists.myitforum.com Subject: [mssms] RE: Query specific installed updates I tried Get-Hotfix initially. Doesn't work for some reason. I don't think it pulls in non-Windows OS updates. From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com]<mailto:[mailto:listsad...@lists.myitforum.com]> On Behalf Of Daniel Ratliff Sent: Wednesday, August 07, 2013 10:47 AM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> 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: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Beardsley, James Sent: Wednesday, August 07, 2013 10:30 AM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> 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. [cid:image001.png@01CE936A.FC959140] 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. ________________________________ 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.
<<inline: image001.png>>