{"componentChunkName":"component---src-templates-articles-index-jsx","path":"/articles/install-windows-patches-powershell/","result":{"data":{"props":{"adsense":true,"adsenseMobile":null,"byLine":"","canonical":"https://staging.business.com/articles/install-windows-patches-powershell/","content":"\n<p>Querying missing patches and installing them across many different Windows systems can be a chore if you don't have the right tool. Many different commercial offerings exist, but if you want a free solution that requires a little bit of PowerShell know-how, you can use a free, community module called PSWindowsUpdate to do the trick.</p>\r\n<h2>Installing and getting to know PSWindowsUpdate</h2>\r\n<p>PSWindowsUpdate is a community module that's available via the PowerShell Gallery. In your PowerShell session, run Install-Module PSWindowsUpdate to download and install the latest version. The download should be quick. Once downloaded, the module's commands should be available to you. By running Get-Command -Module PSWindowsUpdate, you can see that we can do a lot of things other than just installing patches.</p>\r\n<p><picture class=\"aligncenter med\"><source srcset=\"/images/content/5cb/0f7d59c658a20268b4581/742_-395- 742w, /images/content/5cb/0f7d59c658a20268b4581/412_-219- 412w, /images/content/5cb/0f7d59c658a20268b4581/206_-109- 206w\" sizes=\"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%\"></source><img src=\"/images/content/5cb/0f7d59c658a20268b4581/3899-2078-\" alt=\"\" width=\"3899\" height=\"2078\" data-content-img-id=\"5cb0f7d59c658a20268b4581\"></picture></p>\r\n<p><picture class=\"aligncenter med\"><source srcset=\"/images/content/5cb/0f7ea5a215e500e8b457a/742_-930- 742w, /images/content/5cb/0f7ea5a215e500e8b457a/412_-516- 412w, /images/content/5cb/0f7ea5a215e500e8b457a/206_-258- 206w\" sizes=\"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%\"></source><img src=\"/images/content/5cb/0f7ea5a215e500e8b457a/3899-4892-\" alt=\"\" width=\"3899\" height=\"4892\" data-content-img-id=\"5cb0f7ea5a215e500e8b457a\"></picture></p>\r\n<h2>Querying missing patches</h2>\r\n<p>Before you can install patches, you need to know which patches you need across your systems. The PSWindowsUpdate module provides a command called Get-WindowsUpdate we can use to discover any missing patches. The Get-WindowsUpdate command supports querying the local computer or remote computers.</p>\r\n<p>When run, you can see below that it returns a list of all of the missing updates on whatever computer you target.</p>\r\n<p><picture class=\"aligncenter med\"><source srcset=\"/images/content/5cb/0f8139c658a467c8b456f/742_-149- 742w, /images/content/5cb/0f8139c658a467c8b456f/412_-83- 412w, /images/content/5cb/0f8139c658a467c8b456f/206_-41- 206w\" sizes=\"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%\"></source><img src=\"/images/content/5cb/0f8139c658a467c8b456f/2000-404-\" alt=\"\" width=\"2000\" height=\"404\" data-content-img-id=\"5cb0f8139c658a467c8b456f\"></picture></p>\r\n<h2>Installing missing patches</h2>\r\n<p>Once you know what you're missing, you can take that information and install the patches. Get-WindowsUpdate provides many different parameters to query and install updates. For example, if we're happy with installing the list of patches provided with Get-WindowsUpdate with no parameters, we can take the next logical step and install them.</p>\r\n<p>There are many \"states\" a patch can be, such as available, downloaded and installed. Some patches need a reboot to complete an install, while some don't and so on. The Get-WindowsUpdate command gives you the flexibility to pick and choose what updates are installed.</p>\r\n<p>For example, let's say that we don't care about anything other than getting the missing updates installed on my computer. In that case, we can provide the nuclear approach by telling Get-WindowsUpdate to install all missing patches, accepting every one that it finds and initiating a reboot if it needs one.</p>\r\n<p><picture class=\"aligncenter med\"><source srcset=\"/images/content/5cb/0f8317b437475788b456b/742_-38- 742w, /images/content/5cb/0f8317b437475788b456b/412_-21- 412w, /images/content/5cb/0f8317b437475788b456b/206_-10- 206w\" sizes=\"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%\"></source><img src=\"/images/content/5cb/0f8317b437475788b456b/3899-202-\" alt=\"\" width=\"3899\" height=\"202\" data-content-img-id=\"5cb0f8317b437475788b456b\"></picture></p>\r\n<p>We could be a little more gentle and only pick specific updates using the KBArticleId parameter. The below command would install only that particular KB, and if it needed a reboot, it would let us know rather than automatically rebooting.</p>\r\n<p><picture class=\"aligncenter med\"><source srcset=\"/images/content/5cb/0f8537b4374b85e8b45b7/742_-38- 742w, /images/content/5cb/0f8537b4374b85e8b45b7/412_-21- 412w, /images/content/5cb/0f8537b4374b85e8b45b7/206_-10- 206w\" sizes=\"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%\"></source><img src=\"/images/content/5cb/0f8537b4374b85e8b45b7/2000-104-\" alt=\"\" width=\"2000\" height=\"104\" data-content-img-id=\"5cb0f8537b4374b85e8b45b7\"></picture></p>\r\n<h2>Summary</h2>\r\n<p class=\"FirstParagraph\">The PSWindowsUpdate module has many different options and way too much to cover in one article. I encourage you to download and try it out. Be sure to check out the extensive help documentation for each function if you're unfamiliar with the syntax. If you have the patience to learn this module, you can build some advanced update management solutions.</p>\n","docType":"article","guid":"articles_d29a00b75f6e5b671c4c8f9e8f60be2f","lastModified":"2019-04-15T12:00:00.000Z","published":"2019-04-15T12:00:00.000Z","structuredData":null,"subtitle":"This free solution can save you money, but you have to know how to use it.","template":"legacy","title":"How to Install Windows Patches With PowerShell for Free","type":"article","author":{"avatar":null,"bio":"Adam Bertram is a 20-year veteran of IT and experienced online business professional. He's an entrepreneur, IT influencer, Microsoft MVP, blogger, trainer and content marketing writer for multiple technology companies. Adam is also the founder of the popular IT career development platform TechSnips. Catch up on Adam's articles at adamtheautomator.com, connect on LinkedIn, or follow him on Twitter at @adbertram or the TechSnips Twitter account at @techsnips_io.","name":"Adam Bertram","image":null,"slug":null,"social":{"facebook":"","linkedin":"https://www.linkedin.com/in/adambertram/","twitter":"https://twitter.com/adbertram","website":"https://www.adamtheautomator.com/"},"status":"enabled","title":null,"type":"Contributing Writer","user":{"imagePath":"https://staging.business.com/images/undefined","profile":{"company":"eGain Communications","jobTitle":"Product Management Analyst","website":""}}},"breadcrumbs":null,"channels":{"primary":{"name":"Technology","slug":"technology"},"sub":{"name":"Technology Solutions","slug":"technology-solutions"}},"meta":{"robots":"index, follow","description":"Microsoft's PowerShell is a free tool that you can use to run your Windows PC installs, but it requires that you learn a few things.","title":"How to Install Windows Patches With PowerShell - business.com"},"parsedContent":{"toc":[{"id":"installing-and-getting-to-know-pswindowsupdate","title":"Installing and getting to know PSWindowsUpdate"},{"id":"querying-missing-patches","title":"Querying missing patches"},{"id":"installing-missing-patches","title":"Installing missing patches"},{"id":"summary","title":"Summary"}],"json":[{"component":"p","children":["Querying missing patches and installing them across many different Windows systems can be a chore if you don't have the right tool. Many different commercial offerings exist, but if you want a free solution that requires a little bit of PowerShell know-how, you can use a free, community module called PSWindowsUpdate to do the trick."]},{"component":"h2","props":{"id":"installing-and-getting-to-know-pswindowsupdate"},"children":["Installing and getting to know PSWindowsUpdate"]},{"component":"p","children":["PSWindowsUpdate is a community module that's available via the PowerShell Gallery. In your PowerShell session, run Install-Module PSWindowsUpdate to download and install the latest version. The download should be quick. Once downloaded, the module's commands should be available to you. By running Get-Command -Module PSWindowsUpdate, you can see that we can do a lot of things other than just installing patches."]},{"component":"p","children":[{"component":"picture","props":{"className":"aligncenter med"},"children":[{"component":"source","props":{"srcSet":"/images/content/5cb/0f7d59c658a20268b4581/742_-395- 742w, /images/content/5cb/0f7d59c658a20268b4581/412_-219- 412w, /images/content/5cb/0f7d59c658a20268b4581/206_-109- 206w","sizes":"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%"}},{"component":"img","props":{"src":"/images/content/5cb/0f7d59c658a20268b4581/3899-2078-","alt":"","width":"3899","height":"2078","data-content-img-id":"5cb0f7d59c658a20268b4581"}}]}]},{"component":"p","children":[{"component":"picture","props":{"className":"aligncenter med"},"children":[{"component":"source","props":{"srcSet":"/images/content/5cb/0f7ea5a215e500e8b457a/742_-930- 742w, /images/content/5cb/0f7ea5a215e500e8b457a/412_-516- 412w, /images/content/5cb/0f7ea5a215e500e8b457a/206_-258- 206w","sizes":"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%"}},{"component":"img","props":{"src":"/images/content/5cb/0f7ea5a215e500e8b457a/3899-4892-","alt":"","width":"3899","height":"4892","data-content-img-id":"5cb0f7ea5a215e500e8b457a"}}]}]},{"component":"h2","props":{"id":"querying-missing-patches"},"children":["Querying missing patches"]},{"component":"p","children":["Before you can install patches, you need to know which patches you need across your systems. The PSWindowsUpdate module provides a command called Get-WindowsUpdate we can use to discover any missing patches. The Get-WindowsUpdate command supports querying the local computer or remote computers."]},{"component":"p","children":["When run, you can see below that it returns a list of all of the missing updates on whatever computer you target."]},{"component":"p","children":[{"component":"picture","props":{"className":"aligncenter med"},"children":[{"component":"source","props":{"srcSet":"/images/content/5cb/0f8139c658a467c8b456f/742_-149- 742w, /images/content/5cb/0f8139c658a467c8b456f/412_-83- 412w, /images/content/5cb/0f8139c658a467c8b456f/206_-41- 206w","sizes":"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%"}},{"component":"img","props":{"src":"/images/content/5cb/0f8139c658a467c8b456f/2000-404-","alt":"","width":"2000","height":"404","data-content-img-id":"5cb0f8139c658a467c8b456f"}}]}]},{"component":"h2","props":{"id":"installing-missing-patches"},"children":["Installing missing patches"]},{"component":"p","children":["Once you know what you're missing, you can take that information and install the patches. Get-WindowsUpdate provides many different parameters to query and install updates. For example, if we're happy with installing the list of patches provided with Get-WindowsUpdate with no parameters, we can take the next logical step and install them."]},{"component":"p","children":["There are many \"states\" a patch can be, such as available, downloaded and installed. Some patches need a reboot to complete an install, while some don't and so on. The Get-WindowsUpdate command gives you the flexibility to pick and choose what updates are installed."]},{"component":"p","children":["For example, let's say that we don't care about anything other than getting the missing updates installed on my computer. In that case, we can provide the nuclear approach by telling Get-WindowsUpdate to install all missing patches, accepting every one that it finds and initiating a reboot if it needs one."]},{"component":"p","children":[{"component":"picture","props":{"className":"aligncenter med"},"children":[{"component":"source","props":{"srcSet":"/images/content/5cb/0f8317b437475788b456b/742_-38- 742w, /images/content/5cb/0f8317b437475788b456b/412_-21- 412w, /images/content/5cb/0f8317b437475788b456b/206_-10- 206w","sizes":"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%"}},{"component":"img","props":{"src":"/images/content/5cb/0f8317b437475788b456b/3899-202-","alt":"","width":"3899","height":"202","data-content-img-id":"5cb0f8317b437475788b456b"}}]}]},{"component":"p","children":["We could be a little more gentle and only pick specific updates using the KBArticleId parameter. The below command would install only that particular KB, and if it needed a reboot, it would let us know rather than automatically rebooting."]},{"component":"p","children":[{"component":"picture","props":{"className":"aligncenter med"},"children":[{"component":"source","props":{"srcSet":"/images/content/5cb/0f8537b4374b85e8b45b7/742_-38- 742w, /images/content/5cb/0f8537b4374b85e8b45b7/412_-21- 412w, /images/content/5cb/0f8537b4374b85e8b45b7/206_-10- 206w","sizes":"(min-width: 870px) 412px, (min-width: 400px) 38vw, 62%"}},{"component":"img","props":{"src":"/images/content/5cb/0f8537b4374b85e8b45b7/2000-104-","alt":"","width":"2000","height":"104","data-content-img-id":"5cb0f8537b4374b85e8b45b7"}}]}]},{"component":"h2","props":{"id":"summary"},"children":["Summary"]},{"component":"p","props":{"className":"FirstParagraph"},"children":["The PSWindowsUpdate module has many different options and way too much to cover in one article. I encourage you to download and try it out. Be sure to check out the extensive help documentation for each function if you're unfamiliar with the syntax. If you have the patience to learn this module, you can build some advanced update management solutions."]}]},"resource":null,"sponsorship":null,"thumbnail":{"path":"https://staging.business.com/images/content/5cb/0f8f67b437497558b4572/1500-0-","caption":"NaMo Stock/Shutterstock","isBlurred":true},"bestPicks":null},"related":{"relatedArticles":[{"title":"PowerShell: Everything You Need to Know","canonical":"https://www.business.com/articles/powershell-everything-you-need-to-know/","slug":"powershell-everything-you-need-to-know","thumbnail":"https://www.business.com/images/content/5b8/998581039eb8f738b457b/1500-0-","dek":"What you need to know to unlock Microsoft PowerShell's full capabilities.","lastModified":"2018-09-05T17:00:00Z","published":"2018-09-05T17:00:00Z","sponsored":false},{"title":"Essential PowerShell Cmdlets For Managing Active Directory","canonical":"https://www.business.com/articles/powershell-active-directory-cmdlets/","slug":"powershell-active-directory-cmdlets","thumbnail":"https://www.business.com/images/content/5cf/90cab7b4374ab068b456f/1500-0-","dek":"Administering Active Directory is one of the most critical roles in any Windows network.","lastModified":"2018-09-04T08:00:00Z","published":"2018-09-04T08:00:00Z","sponsored":false},{"title":"Use PowerShell to Make WSUS Suck Less","canonical":"https://www.business.com/articles/powershell-windows-software-update-services/","slug":"powershell-windows-software-update-services","thumbnail":"https://www.business.com/images/content/5b8/eca2d92a3a4ee5a8b4574/1500-0-","dek":"Windows Software Update Services can use PowerShell to work with servers and Windows.","lastModified":"2018-09-04T10:00:00Z","published":"2018-09-04T10:00:00Z","sponsored":false},{"title":"Essential PowerShell Cmdlets For Auditing And Maintaining Storage","canonical":"https://www.business.com/articles/powershell-for-storage/","slug":"powershell-for-storage","thumbnail":"https://www.business.com/images/content/5d0/18e065a215ea2498b4588/1500-0-","dek":"PowerShell v5 offers some new features for managing storage.","lastModified":"2018-09-04T11:00:00Z","published":"2018-09-04T11:00:00Z","sponsored":false},{"title":"How Entrepreneurs Can Avoid Hidden App Development Costs","canonical":"https://www.business.com/articles/5-tips-cut-app-costs/","slug":"5-tips-cut-app-costs","thumbnail":"https://www.business.com/images/content/5cb/f62e05a215e8c418b4567/1500-0-","dek":"Building an app for your company doesn't have to be stressful and costly.","lastModified":"2019-04-24T21:00:00Z","published":"2019-04-24T21:00:00Z","sponsored":false},{"title":"15 Things to Look for When Choosing Online Meeting Software","canonical":"https://www.business.com/articles/online-meeting-software-features/","slug":"online-meeting-software-features","thumbnail":"https://www.business.com/images/content/5d1/549df7b4374ae538b4569/1500-0-","dek":"Here are some things to consider when deciding which system will work best for your firm","lastModified":"2019-06-28T13:00:00Z","published":"2019-06-28T13:00:00Z","sponsored":false},{"title":"Developing a Patch Rollout Plan With PowerShell","canonical":"https://www.business.com/articles/patch-rollout-plan-powershell/","slug":"patch-rollout-plan-powershell","thumbnail":"https://www.business.com/images/content/5ca/cbe085a215e4d598b458f/1500-0-","dek":"PowerShell allows you to plan your deployment strategy for Microsoft's Patch Tuesday.","lastModified":"2019-04-11T12:41:00Z","published":"2019-04-11T12:41:00Z","sponsored":false},{"title":"Using PowerShell to Manage the Windows Event Log","canonical":"https://www.business.com/articles/powershell-manage-windows-event-log/","slug":"powershell-manage-windows-event-log","thumbnail":"https://www.business.com/images/content/5ca/782507b437408768b457f/1500-0-","dek":"PowerShell has two cmdlets that can help your Windows administrator read the event log.","lastModified":"2019-04-08T19:00:00Z","published":"2019-04-08T19:00:00Z","sponsored":false},{"title":"Managing Files over SFTP with PowerShell","canonical":"https://www.business.com/articles/manage-files-over-sftp-powershell/","slug":"manage-files-over-sftp-powershell","thumbnail":"https://www.business.com/images/content/5d0/1c54e9c658ac27e8b4571/1500-0-","dek":"Native support for Secure File Transfer Protocol (SFTP) is not in PowerShell.","lastModified":"2018-09-05T07:00:00Z","published":"2018-09-05T07:00:00Z","sponsored":false},{"title":"Advice for Choosing a Small Business Document Management System","canonical":"https://www.business.com/articles/small-business-document-management-system/","slug":"small-business-document-management-system","thumbnail":"https://www.business.com/images/content/5e1/4954f9c658aa2288b458a/1500-0-","dek":"Click to learn how to choose the best document management software for your small business.","lastModified":"2020-01-08T13:10:00Z","published":"2020-01-08T13:10:00Z","sponsored":false},{"title":"Should You Use Open-Source Document Management Software?","canonical":"https://www.business.com/articles/open-source-document-management-software/","slug":"open-source-document-management-software","thumbnail":"https://www.business.com/images/content/5e1/cb2d25a215ef9498b4588/1500-0-","dek":"Learn about open-source document management software and how to use it for your business.","lastModified":"2020-01-16T13:00:00Z","published":"2020-01-16T13:00:00Z","sponsored":false},{"title":"Networking Basics: LAN 101","canonical":"https://www.business.com/articles/local-area-network-wi-fi-networking-basics/","slug":"local-area-network-wi-fi-networking-basics","thumbnail":"https://www.business.com/images/content/5b1/a9c8551ee47a74d8b4580/1500-0-","dek":"Learn about the glue that holds our networks together in this LAN primer.","lastModified":"2018-07-11T14:22:00Z","published":"2018-07-11T14:22:00Z","sponsored":false}],"relatedReviews":[{"doc_type":"category","thumbnail":"https://staging.business.com/images/rz/5df908cc5a215e8c4a8b4568/conferencecall_Antonio_Diaz_Getty.jpg","canonical":"https://staging.business.com/categories/best-conference-call-services/","title":"The Best Conference Call Services of 2021","dek":"Which conference call service is right for your business in 2021? We review the top-rated services.","slug":"best-conference-call-services","lastModified":"2021-03-17T18:17:00Z"},{"doc_type":"category","thumbnail":"https://staging.business.com/images/rz/5df3d8695a215e58428b4570/POS_GETTY_DERO2084.jpg","canonical":"https://staging.business.com/categories/best-pos-systems/","title":"The Best POS Systems of 2021","dek":"Before you choose a POS system, check out our reviews of the best picks for 2021. ","slug":"best-pos-systems","lastModified":"2021-03-17T17:33:00Z"},{"doc_type":"category","thumbnail":"https://staging.business.com/images/rz/5e00d4787b43745d6a8b456e/Laptop_undrey_getty.jpg","canonical":"https://staging.business.com/categories/employee-monitoring-software/","title":"The Best Employee Monitoring Software of 2021","dek":"We've narrowed down the best employee monitoring software for businesses. Check out our best picks and reviews.","slug":"employee-monitoring-software","lastModified":"2021-03-05T15:40:00Z"}],"relatedSponsoredArticles":null}},"pageContext":{"displayModified":"2019-04-15T12:00:00.000Z","template":"legacy","title":"How to Install Windows Patches With PowerShell for Free","meta":{"robots":"index, follow"},"docType":"articles","slug":"install-windows-patches-powershell","canonical":"https://staging.business.com/articles/install-windows-patches-powershell/","skipTOC":false}},"staticQueryHashes":[]}