What’s Under your Hood? Finding Installed Roles and Role Services

SBS2008Right now i am dealing with an SBS 2008 Server that was missing the Terminal Services Gateway service. This meant that RWA was not working. Users could login to the RWA, choose which computer to connect to, but then they got an error saying that the Terminal Services Gateway service was not running and to call and shout at their Administrator. Well that isn’t exactly what the error said, but you get the idea.

Of course i was surprised to hear this, but being a new client, and one who has not previously tried to use RWA until i suggested it.. it wasn’t being missed obviously. Of course the Eagle eyed among you will now have grounds to comment on my poor documentation skills and the fact i missed something so obvious from our initial site report, well now isn’t the time for that kind of talk.

Anyway moving to a reference SBS 2008 i have setup and running, AKA my production SBS 2008 server, i wanted to try and find out which roles and services were installed relating to the Terminal Services Gateway.

Switching to my PowerShell Admin Guide i found a very useful command, Get-WindowsFeature, unfortunately this book is for PowerShell 2.0 and that command does not seem to want to play on SBS 2008.

So i hit Google and found reference upon reference to Get-WindowsFeature and Server 2008 R2. yes i thought, great, well what do i do about SBS 2008? I noticed that one of the articles mentioned ServerManagerCMD being depreciated. That was a good sign because it means it was most likely depreciated in 2008 R2, but would happily exist in 2008.

As luck would have it, it does.

From PowerShell (running as Administrator) enter: ServerManagerCMD.exe –Query


In the output, anything highlighted in a rather fetching green, is currently installed.


Using this command very quickly allowed me to find exactly which roles were missing, and even which sub components of that role should be selected to be installed.


As you can see from the screenshot, Terminal Services has several Role components, or Role Services as they are known, but for SBS 2008, only the TS Gateway role service is required.

For good measure ill throw in a screen shot of SBS 2011, loading up PowerShell Modules from the Administrative Tools menu, you can run the command everyone is talking about… Get-WindowsFeature


Disappointingly all of the output here is a single colour, which might make it difficult for you to pick out the info you want.

However, being PowerShell we can do a few extra things here such as exporting the output to a text file, or even filtering the output on screen.

If we just want to focus our attention on Terminal Services, we can amend our command like this.

Get-WindowsFeature –name RDS* (remembering that TS is now RDS)

The switch for –name will filter for any role that has RDS in the name, not the display name (see name column below)

5.2011 Role

Although i am now wondering if this was a bad example because in SBS2011 the RDS roles are installed, but hidden using some lovely SBS Magic.

In any case, this command can be used to identify the roles that are installed on your server, mostly.

For more information about ServerManagerCMD and Get-WindowsFeature check out these resources.

ServerManagerCmd – TechNet

Get-WindowsFeature – TechNet

About Robert Pearman
Robert Pearman is a UK based Small Business Server enthusiast. He has been working within the SMB IT Industry for what feels like forever. Robert likes Piña colada and taking walks in the rain, on occasion he also enjoys writing about Small Business Technology like Windows Server Essentials or more recently writing PowerShell Scripts. If you're in trouble, and you can find him, maybe you can ask him a question.

3 Responses to What’s Under your Hood? Finding Installed Roles and Role Services

  1. Joe says:

    Really Best. I’m impressed by your writing.

  2. John says:

    So did installing the TS gateway role instantly fix the problem ? Or was any manual configuration needed afterwards.

    • Just installing the role did indeed fix the problem.

      Everything else on RWA was already working perfectly well, just the Gateway service was missing.

      Reinstalling through Server Manager fixed the problem. I had to answer some questions when installing the Role, and also create a CAP and an RAP, but i just copied those from another, working, SBS2008 and all was fine.

Leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

%d bloggers like this: