{"id":2599,"date":"2020-10-27T14:15:48","date_gmt":"2020-10-27T21:15:48","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=2599"},"modified":"2020-10-27T14:15:49","modified_gmt":"2020-10-27T21:15:49","slug":"check-for-windows-updates-using-powershell-command-line","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=2599","title":{"rendered":"Check for Windows updates using PowerShell (Command-line)"},"content":{"rendered":"\n<p>To check for new updates and configure Windows Update settings, follow the steps below:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open&nbsp;<strong>Windows Settings<\/strong>&nbsp;(Windows key + i).<\/li><li>Choose&nbsp;<strong>Update &amp; Security<\/strong>.<\/li><li>Choose&nbsp;<strong>Windows Update<\/strong>&nbsp;from the left hand menu.<\/li><li>Press the&nbsp;<strong>Check for updates<\/strong>&nbsp;button in the right hand pane.<img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Check-for-updates.jpg?ezimgfmt=rs:617x357\/rscb42\/ng:webp\/ngcb42\" alt=\"Check for updates\" width=\"650\" height=\"376\">Check for updates<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Run Windows Update from PowerShell (Command-line)<\/h2>\n\n\n\n<p>There is a PowerShell module for Windows Update. You can install and run the module to check for new updates. There are three steps for running Windows Update through PowerShell. Run the following commands step by step:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><em><strong>Install-Module PSWindowsUpdate<\/strong><\/em><img decoding=\"async\" src=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-Module-PSWindowsUpdate-670x268.jpg?ezimgfmt=rs:617x247\/rscb42\/ng:webp\/ngcb42\" alt=\"Install Module PSWindowsUpdate\" width=\"670\" height=\"268\">Install Module PSWindowsUpdateThis will install the Windows Update module in PowerShell.<\/li><li><strong>Get-WindowsUpdate<\/strong><img decoding=\"async\" src=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Get-WindowsUpdate-670x346.jpg?ezimgfmt=rs:617x318\/rscb42\/ng:webp\/ngcb42\" alt=\"Get WindowsUpdate\" width=\"670\" height=\"346\" srcset=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Get-WindowsUpdate-670x346.jpg?ezimgfmt=ng:webp\/ngcb42 670w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Get-WindowsUpdate-300x155.jpg?ezimgfmt=ng:webp\/ngcb42 300w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Get-WindowsUpdate.jpg?ezimgfmt=ng:webp\/ngcb42 768w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Get-WindowsUpdate-20x10.jpg?ezimgfmt=ng:webp\/ngcb42 20w\">Get WindowsUpdateThis command will check for updates.<\/li><li><strong>Install-WindowsUpdate<\/strong><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-WindowsUpdate-670x397.jpg?ezimgfmt=rs:617x366\/rscb42\/ng:webp\/ngcb42\" alt=\"Install WindowsUpdate\" width=\"670\" height=\"397\" srcset=\"https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-WindowsUpdate-670x397.jpg?ezimgfmt=ng:webp\/ngcb42 670w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-WindowsUpdate-300x178.jpg?ezimgfmt=ng:webp\/ngcb42 300w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-WindowsUpdate.jpg?ezimgfmt=ng:webp\/ngcb42 768w,https:\/\/www.itechtics.com\/wp-content\/uploads\/2018\/07\/Install-WindowsUpdate-20x12.jpg?ezimgfmt=ng:webp\/ngcb42 20w\">Install WindowsUpdateThis command will install the available updates (which were listed in step 2)<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Run Windows Update from Command Prompt (Command-line)<\/h2>\n\n\n\n<p>Windows Update can also be run through legacy CMD. The only limitation running Windows Update through command prompt is that it won\u2019t show any progress. Only results are shown. Let\u2019s see how to run it:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Go to Run \u2013&gt; cmd<\/strong><\/li><li>Run the following command to check for new updates:<br><strong>wuauclt \/detectnow&nbsp;<\/strong><\/li><li>Run the following command to install new updates<br><strong>wuauclt \/updatenow<\/strong><\/li><\/ul>\n\n\n\n<p>Since the command prompt does not show any progress, a better approach would be to check and install updates at the same time. Here\u2019s the command for this:<\/p>\n\n\n\n<p><strong>wuauclt \/detectnow \/updatenow<\/strong><\/p>\n\n\n\n<p>The above mentioned command will work in all versions of Windows including Windows 7 and Windows Server 2008 R2. But if you are using Windows 10 or Windows Server 2016, you can use&nbsp;<strong>UsoClient<\/strong>&nbsp;command which has more options than wuauclt. You can run UsoClient with the following switches:<\/p>\n\n\n\n<p><strong>StartScan<\/strong>&nbsp;\u2013 Start checking for updates<\/p>\n\n\n\n<p><strong>StartDownload<\/strong>&nbsp;\u2013 Start downloading updates<\/p>\n\n\n\n<p><strong>StartInstall<\/strong>&nbsp;\u2013 Start installing downloaded updates<\/p>\n\n\n\n<p><strong>RestartDevice<\/strong>&nbsp;\u2013 Restart Windows after updates are installed<\/p>\n\n\n\n<p><strong>ScanInstallWait<\/strong>&nbsp;\u2013 Check for updates, download available updates and install themhttps:\/\/474f4de9179a1ad8472eba9a6de8c752.safeframe.googlesyndication.com\/safeframe\/1-0-37\/html\/container.html<\/p>\n\n\n\n<p>Hopefully, this will be useful in situations where you want to automate certain Windows functions. What other purposes do you want to use command-line options for running Windows Update?<\/p>\n\n\n\n<p>REF:  https:\/\/www.itechtics.com\/run-windows-update-cmd\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To check for new updates and configure Windows Update settings, follow the steps below: Open&nbsp;Windows Settings&nbsp;(Windows key + i). Choose&nbsp;Update &amp; Security. Choose&nbsp;Windows Update&nbsp;from the left hand menu. Press the&nbsp;Check for updates&nbsp;button in the right hand pane.Check for updates Run Windows Update from PowerShell (Command-line) There is a PowerShell module for Windows Update. You can <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=2599\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,14],"tags":[],"class_list":["post-2599","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-windows-7-8-10"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/2599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2599"}],"version-history":[{"count":1,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/2599\/revisions"}],"predecessor-version":[{"id":2600,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/2599\/revisions\/2600"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}