Use PowerShell to Install the Remote Server Administration Tools (RSAT) on Windows 10 version 1809

My computer recently updated to Windows 10 version 1809 and as with all previous major updates of Windows 10, this wipes out the Remote Server Administration Tools (RSAT).

However, unlike previous versions, Microsoft has now made RSAT available via Features on Demand and while you’re supposed to be able to install them from the GUI, they never showed up as being an option for me.

That’s not really a problem though since they can now be installed via PowerShell. Who needs a GUI anyway?

The computer used in this blog article runs Windows 10 Enterprise Edition version 1809 with Windows PowerShell version 5.1 which is the default version of PowerShell that ships with that operating system. The execution policy has been set to Remote Signed (the default is Restricted), although it may not matter for this installation.

The commands used in this blog article are part of the Deployment Image Servicing and Management (DISM) PowerShell module that’s installed by default on Windows 10.

Determine which individual tools are available.

Notice that I specified the Name parameter with RSAT and a wildcard at the end of it as the value instead of piping to Where-Object. This is called filtering left (it’s more efficient than piping to Where-Object).

It’s easier to see what’s available by piping to Select-Object or Format-Table and only selecting a couple of the properties.

While it didn’t matter in this scenario, I generally pipe to Select-Object if I have four or fewer properties and want the output in a table. Why? Because Select-Object returns objects that are usable by other commands in case I wanted to pipe the results to something else. Unless custom formatting has been applied, five properties would result in a list by default in which case I’d have to pipe to Format-Table to return the results in a table.

I want to install them all. The simplest way is to pipe the results from the Get-WindowsCapability command to the Add-WindowsCapability command. How did I know I could pipe one to the other? I read the help. You could specify the name of individual features on demand if you wanted to be more selective on which tools to install.

If the Add-WindowsCapacity command was written using best practices, you could have specified the Confirm parameter and walked through each Feature on Demand selecting whether or not to install it, but unfortunately support for WhatIf and Confirm wasn’t added to it. All PowerShell commands that make changes should support WhatIf and Confirm otherwise the changes could result in a Resume generating event.

Confirm that the tools were indeed installed successfully.

Once installed, they also showed up as being installed in the GUI.

Don’t forget to update the help.

Notice that I didn’t use aliases or positional parameters in this blog article. Anytime you’re sharing or saving code, full command and parameter names should be used as it’s easier to follow and more self-documenting. Think about the next guy, it could be you.


Update – October 4th, 2018
If you happen to receive error 0x800f0954, see the comments in this Reddit post.

µ

8 Comments

  1. Andrew

    Nice. I was able to install them using the GUI, but it was a long, annoying processes because I had to click on each one, then hit install. Also, the list would refresh every time one finished installing for some reason, so I had to find the RSAT tools in the list again.

    Reply
  2. Herc

    Thanks for the very fast workaround you share.

    Reply
  3. Alan A Inman (@aainman)

    Thank you! That was very helpful.

    Reply
  4. Thomas Lee

    See my blog for a simpler
    script https://tfl09.blogspot.com

    Reply
  5. 716candle

    If like me you experience an error 0x800f0954. Try this Change registry key HKLM/Software/Policies/Microsoft/Windows/WindowsUpdate/AU/UseWUServer to 0 and restart windows update services.

    Reply
  6. nu4a

    Run “gpedit.msc” to edit your local computer policy The setting in question is: Computer Configuration\Administrative Templates\System\Specify settings for optional component installation and component repair

    My local policy seems to have defaulted to “Disabled” – after changing it to “Enabled” and selecting the checkbox labeled “Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)” the RSAT tools installed for me.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: