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.

Get-Command -Noun WindowsCapability 1 Get-Command -Noun WindowsCapability

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).

Get-WindowsCapability -Name RSAT* -Online 1 Get-WindowsCapability -Name RSAT * -Online

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.

Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State 1 Get-WindowsCapability -Name RSAT * -Online | Select-Object -Property DisplayName , State

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.

Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online 1 Get-WindowsCapability -Name RSAT * -Online | Add-WindowsCapability -Online

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.

Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State 1 Get-WindowsCapability -Name RSAT * -Online | Select-Object -Property DisplayName , State

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

Don’t forget to update the help.

Update-Help 1 Update-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.

Update – November 16, 2018

Be sure to view my TechSnips video on the same subject. It contains some additional information.

µ

Share this: Twitter

Reddit

LinkedIn

Facebook

Pocket

Print

