Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebAdministration powershell module not found on windows server data center

In Windows Server 2008 Datacenter, I could not find the PowerShell webadministration module. I tried Get-PSSnapin and Get-Module -ListAvailable, neither of which showed webadministration

And I don't see the webadministration module under the directory %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules !!

Do I need to install or enable something to have webadministration on Datacenter ?

like image 369
Jeevan Avatar asked May 11 '11 11:05

Jeevan


3 Answers

You need to have web server role (IIS) installed. WebAdministration is a module. So, use Get-Module -ListAvailable

Also, looks like these cmdlets are available only on Windows Server 2008 R2 or with IIS 7.5. So, if you have IIS7.5 on Windows Server 2008, these cmdlets will be available.

like image 53
ravikanth Avatar answered Oct 28 '22 11:10

ravikanth


You can install the snapin. You can then use this script to load it.

like image 39
Richard Nienaber Avatar answered Oct 28 '22 12:10

Richard Nienaber


For automation with Windows Server 2008, We use WebPiCmd to push IISPowershellSnapin, then run Add-PSSnapin WebAdministration to support IIS powershell integration. The IIS Administration Module is already present in Windows Server 2012 by default.

Powershell - Support IIS Administration for Server 2008

.\WebpiCmd.exe /Install /Products:IISPowershellSnapin /AcceptEula /ForceReboot
Add-PSSnapin WebAdministration
Get-Website
like image 2
SliverNinja - MSFT Avatar answered Oct 28 '22 11:10

SliverNinja - MSFT