search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Powershell, Windows Server | No Comment | 3,295 views | 02/10/2009 23:00

Now, ServerManagerCMD on Windows Server 2008 R2 is deprecated! You should use Powershell modules to install or remove roles and features.

If you need to install IIS with all subfeatures:

1
2
Import-Module ServerManager
Add-WindowsFeature Web-Server -IncludeAllSubFeature

If you need to remove a feature:

1
2
Import-Module ServerManager
Remove-WindowsFeature *Name*

If you need to get all features:

1
2
Import-Module ServerManager
Get-WindowsFeature

If you need to install all Web features:

1
2
Import-Module ServerManager
Get-WindowsFeature Web-* | Add-WindowsFeature

You need to change your automation scripts if you have :)