DISM versus verb-WindowsFeature

I was trying to create a script that could be run from either Windows client or Windows server. In the script I wanted to be able check to see if a particular feature was installed, and if not, install the feature so I could use the appropriate PowerShell cmdlets. I'm not sure if I am not aware of a way to do this, or if it is a limitation.

As you are aware, you cannot use the Get-WindowsFeature or Install-WindowsFeature on Windows client. So I figured I would test using DISM. Then I found that the features are apparently named completely different on client than on server. For example, on client, the remote administration features are prefixed with RemoteServerAdministrationTools.  On server, they are prefixed with RSAT.  String after the prefix also change.

I know I can build a table that would have both values in it, and do lookups and selections based on whether a client or server is running the script, but I was wondering if there was something I don't know of behind the scenes that actually presents a common naming schema between client and server.  I was really surprised to find such a big difference between client and server when so much is made of how PowerShell has standardized things.  I do most of my work on server, and when I have the proper remote tools installed on either server or client, scripts run fine.  But this one threw me for a loop.

Thanks for the ins

September 9th, 2015 7:45pm

Is there a question somewhere in all of that?
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 8:00pm

To answer what I believe is the nature of your query:

Windows server operating systems has a module called ServerManager - it is this module that contains the windowsfeature cmdlets.

Windows desktop operating systems do not have the ServerManager module for obvious reasons and therefore do not have the windowsfeature cmdlets.

So, you are correct in your findings that you must use different commands on server operating systems to manage features and roles that you do in desktop operating systems.

September 9th, 2015 8:17pm

That's what I was afraid of. So DISM must use the same windowfeature list. I was hoping that DISM is 'common' between the two that something would exist there.

Thanks for the insights.

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 8:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics