Old Post – Republished for Migration reasons
Hello World !!
I have performed a standard installation of Windows 2008 R2 (Release Candidate) on my test lab. I wanted to use the ServerManagerCmd command line utility to add windows features.
I launched my command line window and typed the ServerManagerCmd. I noticed immediately a small message stating that this command has been deprecated and alternative options should be used in other words Powershell Cmdlet
Indeed, Windows 2008 R2 comes with 3 new Cmdlet
– Get-WindowsFeature
– Add-WindowsFeature
– Remove-WindowsFeature
So, i opened the windows PowerShell windows and typed the Get-WindowsFeature and got a nice error message stating that this was not a recognized command.
Not a problem ! You need first to import the module ServerManager and then you can run these wonderfull cmdlet. To import the module, you simply type the following
import-module servermanager
I typed again Get-WindowsFeature and got full list of features available. I wanted to install a DNS server. So to restrict the scope of my search, i typed the following command get-WindowsFeature | findstr DNS and the results returned 2 items (see picture below)
To add the dns service/feature, i simply typed the following command-line
Add-WindowsFeature DNS and that was it
I liked the servermanagerCmd as a way to automate and customize additions/deletion of roles and features. But to be honest, i prefer the simple approach of the powershell cmdlet. This is so cool !!
Till next Time
See ya