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