{"id":2581,"date":"2019-11-13T15:35:34","date_gmt":"2019-11-13T14:35:34","guid":{"rendered":"https:\/\/laurentvanacker.com\/?p=2581"},"modified":"2022-05-30T13:53:32","modified_gmt":"2022-05-30T11:53:32","slug":"scan-des-hotfixes-manquants-avec-powershell-v2-scan-missing-hotfixes-with-powershell","status":"publish","type":"post","link":"https:\/\/laurentvanacker.com\/index.php\/2019\/11\/13\/scan-des-hotfixes-manquants-avec-powershell-v2-scan-missing-hotfixes-with-powershell\/","title":{"rendered":"Scan des hotfixes manquants avec PowerShell 2+\/ Scan missing hotfixes with Powershell 2+"},"content":{"rendered":"<div id=\"fr-FR\"><a href=\"#en-US\">English version<\/a><\/div>\n<p>L&rsquo;article <a href=\"https:\/\/laurentvanacker.com\/index.php\/2016\/06\/21\/powershell-mbsa\/\">suivant<\/a>\u00a0 utilisait PowerShell et <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=7558\" target=\"_blank\" rel=\"noopener noreferrer\">MBSA<\/a> pour effectuer un scan des hotfixes Microsoft manquants sur le serveur. <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=7558\" target=\"_blank\" rel=\"noopener noreferrer\">MBSA<\/a> n&rsquo;est plus support\u00e9 sur Windows 10\/Windows Server 2016+.<\/p>\n<p>Je propose ici une solution 100% PowerShell (\u00e0 partir de la version 2.0). Les pr\u00e9requis sont l\u00e9g\u00e8rement plus simples : uniquement les 3 fichiers Cabinet n\u00e9cessaires \u00e0 l&rsquo;analyse si la machine n&rsquo;est pas connect\u00e9e \u00e0 Internet (dans le sous-r\u00e9pertoire \u00ab\u00a0CabDir\u00a0\u00bb &#8211; Il est possible de lancer le script sur une machine connect\u00e9e \u00e0 Internet au pr\u00e9alable pour juste t\u00e9l\u00e9charger ces fichiers et ensuite les copier sur une machine \u00ab\u00a0offline\u00a0\u00bb) . En cas de connectivit\u00e9 \u00e0 Internet, les fichiers seront directement t\u00e9l\u00e9charg\u00e9s.<\/p>\n<p>L&rsquo;avantage de cette solution r\u00e9side ici dans le format de sortie :\u00a0 1 fichier CSV<\/p>\n<ul>\n<li>l&rsquo;autre avec le d\u00e9tail (en option).<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2594\" src=\"https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1.png\" alt=\"\" width=\"1649\" height=\"89\" srcset=\"https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1.png 1649w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-300x16.png 300w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-1024x55.png 1024w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-768x41.png 768w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-1536x83.png 1536w\" sizes=\"auto, (max-width: 1649px) 100vw, 1649px\" \/><\/p>\n<p>On ne peut faire plus lisible.<\/p>\n<p>Le script est disponible <a href=\"https:\/\/github.com\/lavanack\/laurentvanacker.com\/blob\/master\/Windows%20Powershell\/Windows\/Security\/Get-MissingHotFix\/Get-MissingHotFix.ps1\">ici<\/a> (sur <a href=\"https:\/\/github.com\/lavanack\/laurentvanacker.com\">GitHub<\/a>)<\/p>\n<hr \/>\n<div><\/div>\n<div id=\"en-US\"><a href=\"#fr-FR\">Version fran\u00e7aise<\/a><\/div>\n<div id=\"gt-form-c\">\n<form id=\"gt-form\" action=\"\/\" method=\"post\" name=\"text_form\">\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">The following <a href=\"https:\/\/laurentvanacker.com\/index.php\/2016\/06\/21\/powershell-mbsa\/\">article<\/a> used PowerShell and <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=7558\" target=\"_blank\" rel=\"noopener noreferrer\">MBSA<\/a> to scan missing Microsoft hotfixes on the server. <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=7558\" target=\"_blank\" rel=\"noopener noreferrer\">MBSA<\/a> is no longer supported on Windows 10 \/ Windows Server 2016+.<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">I propose here a 100% PowerShell solution (from version 2.0). The prerequisites are slightly simpler: only the 3 cabinet files needed for analysis if the machine is not connected to the Internet (in the \u00ab\u00a0CabDir\u00a0\u00bb subdirectory\u00a0 &#8211; It is possible to run the script on an Internet connected machine first to just download these files and then copy them to an \u00ab\u00a0offline\u00a0\u00bb machine). In case of Internet connectivity, the files will be directly downloaded.<\/div>\n<\/form>\n<\/div>\n<div id=\"gt-c\" class=\"g-section\">\n<div id=\"gt-form-c\">\n<form id=\"gt-form\" action=\"\/\" method=\"post\" name=\"text_form\">\n<div id=\"gt-text-all\">\n<div id=\"gt-main\">\n<div id=\"gt-text-c\">\n<div id=\"gt-text-top\">\n<div id=\"gt-res-c\" class=\"g-unit\">\n<div id=\"gt-res-p\">\n<div id=\"gt-res-data\">\n<div id=\"gt-res-wrap\">\n<div id=\"gt-res-content\" class=\"almost_half_cell\">\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><span id=\"result_box\" lang=\"en\">The advantage of this solution is the output format: 1 CSV file<\/span><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2594\" src=\"https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1.png\" alt=\"\" width=\"1649\" height=\"89\" srcset=\"https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1.png 1649w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-300x16.png 300w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-1024x55.png 1024w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-768x41.png 768w, https:\/\/laurentvanacker.com\/wp-content\/uploads\/2019\/11\/1-1536x83.png 1536w\" sizes=\"auto, (max-width: 1649px) 100vw, 1649px\" \/><\/p>\n<\/div>\n<p>Nothing can be more readable.<\/p>\n<p>The script est available <a href=\"https:\/\/github.com\/lavanack\/laurentvanacker.com\/blob\/master\/Windows%20Powershell\/Windows\/Security\/Get-MissingHotFix\/Get-MissingHotFix.ps1\">here<\/a> (on <a href=\"https:\/\/github.com\/lavanack\/laurentvanacker.com\">GitHub<\/a>)<\/p>\n<p>Laurent.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/form>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>English version L&rsquo;article suivant\u00a0 utilisait PowerShell et MBSA pour effectuer un scan des hotfixes Microsoft manquants sur le serveur. MBSA n&rsquo;est plus support\u00e9 sur Windows [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,12],"tags":[48,39,41],"class_list":["post-2581","post","type-post","status-publish","format-standard","hentry","category-powershell","category-securite-security","tag-github","tag-powershell","tag-securite"],"_links":{"self":[{"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/posts\/2581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/comments?post=2581"}],"version-history":[{"count":13,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/posts\/2581\/revisions"}],"predecessor-version":[{"id":2896,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/posts\/2581\/revisions\/2896"}],"wp:attachment":[{"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/media?parent=2581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/categories?post=2581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentvanacker.com\/index.php\/wp-json\/wp\/v2\/tags?post=2581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}