{"id":530,"date":"2016-11-24T16:42:53","date_gmt":"2016-11-24T15:42:53","guid":{"rendered":"http:\/\/snakenet.eu\/blog\/?p=530"},"modified":"2016-11-24T16:42:53","modified_gmt":"2016-11-24T15:42:53","slug":"lister-toutes-les-mises-a-jour-windows","status":"publish","type":"post","link":"https:\/\/snakenet.eu\/blog\/lister-toutes-les-mises-a-jour-windows\/530\/","title":{"rendered":"Lister toutes les mises a jour Windows"},"content":{"rendered":"<p>$Session = New-Object -ComObject \u00ab\u00a0Microsoft.Update.Session\u00a0\u00bb<br \/>\n$Searcher = $Session.CreateUpdateSearcher()<br \/>\n$historyCount = $Searcher.GetTotalHistoryCount()<br \/>\n$Searcher.QueryHistory(0, $historyCount) | Select-Object Date,<br \/>\n@{name=\u00a0\u00bbOperation\u00a0\u00bb; e={switch($_.operation){<br \/>\n1 {\u00ab\u00a0Installation\u00a0\u00bb}; 2 {\u00ab\u00a0Uninstallation\u00a0\u00bb}; 3 {\u00ab\u00a0Other\u00a0\u00bb}}}},<br \/>\n@{name=\u00a0\u00bbStatus\u00a0\u00bb; e={switch($_.resultcode){<br \/>\n1 {\u00ab\u00a0In Progress\u00a0\u00bb}; 2 {\u00ab\u00a0Succeeded\u00a0\u00bb}; 3 {\u00ab\u00a0Succeeded With Errors\u00a0\u00bb};\u00a04 {\u00ab\u00a0Failed\u00a0\u00bb}; 5 {\u00ab\u00a0Aborted\u00a0\u00bb}}}},<br \/>\n@{name=\u00a0\u00bbKB\u00a0\u00bb;E={$_.title.split(\u00ab\u00a0(\u00ab\u00a0)[1].split(\u00ab\u00a0)\u00a0\u00bb)[0]} },<br \/>\nTitle | Export-Csv -NoType \u00ab\u00a0$Env:userprofile\\Desktop\\Windows Updates.csv\u00a0\u00bb<br \/>\nSource : https:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/4197.how-to-list-all-of-the-windows-and-software-updates-applied-to-a-computer.aspx<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>$Session = New-Object -ComObject \u00ab\u00a0Microsoft.Update.Session\u00a0\u00bb $Searcher = $Session.CreateUpdateSearcher() $historyCount = $Searcher.GetTotalHistoryCount() $Searcher.QueryHistory(0, $historyCount) | Select-Object Date, @{name=\u00a0\u00bbOperation\u00a0\u00bb; e={switch($_.operation){ 1 {\u00ab\u00a0Installation\u00a0\u00bb}; 2 {\u00ab\u00a0Uninstallation\u00a0\u00bb}; 3 {\u00ab\u00a0Other\u00a0\u00bb}}}}, @{name=\u00a0\u00bbStatus\u00a0\u00bb; e={switch($_.resultcode){ 1 {\u00ab\u00a0In Progress\u00a0\u00bb}; 2 {\u00ab\u00a0Succeeded\u00a0\u00bb}; 3 {\u00ab\u00a0Succeeded With Errors\u00a0\u00bb};\u00a04 {\u00ab\u00a0Failed\u00a0\u00bb}; 5 {\u00ab\u00a0Aborted\u00a0\u00bb}}}}, @{name=\u00a0\u00bbKB\u00a0\u00bb;E={$_.title.split(\u00ab\u00a0(\u00ab\u00a0)[1].split(\u00ab\u00a0)\u00a0\u00bb)[0]} }, Title | Export-Csv -NoType \u00ab\u00a0$Env:userprofile\\Desktop\\Windows Updates.csv\u00a0\u00bb Source : https:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/4197.how-to-list-all-of-the-windows-and-software-updates-applied-to-a-computer.aspx &nbsp;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,63],"tags":[],"class_list":["post-530","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows"],"_links":{"self":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/comments?post=530"}],"version-history":[{"count":1,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":531,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/530\/revisions\/531"}],"wp:attachment":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/media?parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/categories?post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/tags?post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}