11

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 ?

SteveC
  • 15,808
  • 23
  • 102
  • 173
Jeevan
  • 8,532
  • 14
  • 49
  • 67

3 Answers3

10

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.

ravikanth
  • 24,922
  • 4
  • 60
  • 60
  • Hi Ravi, web server role is installed , I tried Get-Module -ListAvailable it did not show WebAdministration also as mentioned earlier under the module directory WebAdministration module is not there! – Jeevan May 11 '11 at 12:11
  • Interesting. So, you are using Windows Server 2008 and not R2. Right? What do you see when you do `Get-PSSnapin -Registered`? – ravikanth May 11 '11 at 13:02
  • info related Microsoft.Powershell.Sharepoint, SqlserverCmdletSnapin100, Sqlserverprovidersnapin100 snapins thats all – Jeevan May 11 '11 at 13:19
  • Hmm, I have a feeling that this module is available only on R2. I don't have a WIndows 2008 system to verify this at the moment. – ravikanth May 11 '11 at 13:23
  • 1
    Check this link: http://learn.iis.net/page.aspx/29/installing-iis-7-on-windows-server-2008-or-windows-server-2008-r2/ I could not find any MS official doc on this. – ravikanth May 11 '11 at 13:29
6

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

Community
  • 1
  • 1
Richard Nienaber
  • 10,324
  • 6
  • 55
  • 66
2

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
Community
  • 1
  • 1
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173