RE: Installing Windows Features with Windows PowerShell

Recently my colleague Robin Plomp wrote an article about installing features in Window Server 2008 R2 (or Windows 7) with Windows PowerShell scripts:

“I ‘m a big fan of the new version of the Windows server platform. I’ve recently deployed 6 Windows 2008 (64) R2 servers. On one of the servers I am going to install Microsoft Office Communicator 2007 R2. One of the prerequisites is .NET Framework 3.5 SP1. This can be installed in the ServerManager under Features. This means you have to scroll down a long list of Windows Features. There has to be an easier way.
Enter the world of Windows PowerShell!”

Read more

Although PowerShell is a great tool for installing features, or performing other tasks, it isn’t necessary for automated installation of features.
Enter the world op “Deployment Image Servicing and Management(DISM)” or dism.exe (located in the system folder)!!!

With dism.exe you’re not just able to service Windows Images, it enables you to query and enable features. If you, for example, would like to enable the feature DHCPServer all you have to execute is the following command:
dism.exe /online /enable-feature:DHCPServer

A complete list of features can be queried with the following command
dism.exe /online /get-features (/format:table)

You can read more about dism here.

Ingmar Verheij

Was once an enthusiastic PepperByte employee but is now working at Citrix. His blogs are still valuable to us and we hope to you too.