How to use Powershell to install roles/services/features in windows 2k8 server R2?

When I used Servermanagercmd.exe to install a role, I got the message:

Servermanagercmd.exe is deprecated, and is not guaranteed to be supported in future releases of Windows. We recommend that you use the Windows PowerShell cmdlets that are available for Server Manager..

So I believe Powershell can achieve at least the same functionality as Servermanagercmd.exe sooner or later, but I am not sure about:

1. Has powershell reached the point that it can replace servermanagercmd.exe? if not, when? This question determines whether I should still stick to servermanagercmd.exe for now.

2. Where is the reference about how to use powershell to install roles/services/features? I found little to nothing information so far. L

Appreciate your help.

Thanks

Leon

June 29th, 2009 9:45am

There is a Powershell module called Server Manager

PS C:\Users\Administrator> import-module ServerManager
PS C:\Users\Administrator> Get-command -module ServerManager

CommandType Name
----------- ----
Cmdlet Add-WindowsFeature
Cmdlet Get-WindowsFeature
Cmdlet Remove-WindowsFeature

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2009 5:05pm

Thanks Brandon.

Here is also a good link: http://blogs.msdn.com/powershell/archive/2009/01/27/managing-server-features-with-powershell-cmdlets-on-windows-2008-server-r2-beta.aspx
June 29th, 2009 7:34pm

Is the same going to happend to other cmdline tools like appcmd etc...well I'd better start getting up to speed with PS
Free Windows Admin Tool Kit Click here and download it now
July 7th, 2009 3:38pm

You should check this blog post out:
http://blogs.msdn.com/powershell/archive/2008/10/29/574-reasons-why-we-are-so-proud-and-optimistic-about-w7-and-ws08r2.aspx

Now the above is for Server2008R2. If you're running Server 2008, you can get the PowerShell IIS snapin here:
http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1664
July 7th, 2009 3:50pm

Is there a comparable module for windows 7 x64?  when I try to run "Import-Module ServerManager" (running PS Console as Administrator) I get the following error:

"The specified module 'ServerManager' was not loaded because no valid module file was found in any module directory."

Do I have to download it somewhere?  Is there a different module to use?  Any assistance is greatly appreciated!

Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 3:52pm

hi take a look at here so that you can get a detailed view about how to install the windows features http://www.techken.in/windows-server-os/install-windows-features-powershell/
February 5th, 2015 1:43pm

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

Other recent topics Other recent topics