Installing WSUS on Windows Server 2012 with PowerShell

There is a really valuable blog post on the Hey Scripting Guy! blog that explains how to install and configure WSUS on Windows Server 2012 using PowerShell. Enjoy!

https://blogs.technet.com/b/heyscriptingguy/archive/2013/04/15/installing-wsus-on-windows-server-2012.aspx

 

P.S. we're looking at improving our own PowerShell coverage in WSUS in the future as part of our work towards compliance with Microsoft's Common Engineering Criteria. If there are scenarios you find particularly painful or just missing, please let us know in the comments below. We'll consider and respond to every piece of feedback!

Comments

  • Anonymous
    January 01, 2003
    I'm glad that you guys are continuing to improve on the existing UpdateServices module! I guess I will be the first to leave my comments on things that I would like to see in the next release. I guess I could use my own module: PoshWSUS (http://poshwsus.codeplex.com) as things that I would like to see added in future releases to your module. If I had to narrow it down to a top 8, then I would go with the following items:
  1. Create/Remove/Get Target Groups
  2. Remove computers from Target Groups
  3. Get/Set email notifications
  4. Start/Stop synchronization
  5. Get/Create/Set/Remove Install approval rules
  6. Get synchronizationhistory
  7. Get WSUS events
  8. Get members of a Target Group Thanks! Boe
  • Anonymous
    December 15, 2014
    Why does the Get-WSUSServer cmdlet not have a mechanism for handling credentials? I'd really like to run this connection under a named context rather than the current user context. Something like Get-WSUSServer -Credential $cred would make life much easier
  • Anonymous
    March 30, 2015
    Hi, you got any infos how to automate the use of the Default Website via script in Powershell ?
    in W2008 there was
    AppCmd.exe set config "Default Web Site/"
  • Anonymous
    July 08, 2015
    Hello WSUS Product Team,

    Can you add support for deadlines with the Approve-WsusUpdate cmdlet?

    My organisation is in need of a standardising automation of patching schedules across a large number of clients and having the option to include a deadline would make this task much easier to develop an automation platform.

    I am aware that this can be achieved by loading the "Microsoft.UpdateServices.Administration" assembly reflection and taking advantage of the inherited Approve method, however this means that we would probably have to develop an entire custom module in order to achieve this, which we do not have the resources for.

    Thanks for the work done on WSUS so far and brining it to .NET!

  • Anonymous
    December 04, 2015
    Hey Kudos on all the effort that went into this motherlode list How about one more tips here.
    http://khelomcx.com/free-trial-commodity-tips
  • Anonymous
    February 06, 2016
    Thank you for sharing post. http://www.kehribarizle.com/
  • Anonymous
    November 17, 2016
    Would love to see a powershell command that can be used to query a specific computer and get all the updates that meet a certain status. Example. Get a list of all serverA's failed updates, or a list of serverBs needed updates. This would help us provide data to the server administrators if they want to manually remediate a failing update.
  • Anonymous
    December 29, 2016
    How about metadata import and export cmdlets to support non-Internet-connected installations? I mean, I can keep using wsusutil, but it would be great to have a cmdlet to use.
  • Anonymous
    April 17, 2017
    Get-WSUSComputer filters don't work as expected. When trying to use included or excluded installation states cmdlet returns the group of servers you were targeting rather than filtering at all. I am using 2.0.0.0 verision of Module. @ben herila
    • Anonymous
      May 05, 2017
      Haven't confirmed this behavior, but it sounds like it might be a bug. Are you able to use PowerShell to access the WSUSComputer you're looking for, if only in a roundabout way?