在Windows服务器数据中心没有findWebAdministration的PowerShell模块

Windows Server 2008 Datacenter中,找不到PowerShell webadministration模块。 我试过Get-PSSnapinGet-Module -ListAvailable ,它们都没有显示Get-Module -ListAvailable

而我没有看到目录%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules下的webadministration %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules

我是否需要安装或启用某些东西才能在Datacenter上进行Webpipe理?

您需要安装Web服务器角色(IIS)。 Web管理是一个模块。 所以,使用Get-modulee -ListAvailable

此外,看起来像这些cmdlet只能在Windows server 2008 R2或IIS 7.5上使用。 因此,如果您在Windows server 2008上具有IIS7.5,则这些cmdlet将可用。

你可以安装管理单元 。 然后你可以使用这个脚本来加载它。

对于使用Windows server 2008进行自动化,我们使用WebPiCmd来推送IISPowershellSnapin ,然后运行Add-PSSnapin WebAdministration来支持IIS PowerShell集成。 IIS管理模块默认情况下已经存在于Windows server 2012中

Powershell – 支持server 2008的IIS管理

 .\WebpiCmd.exe /Install /Products:IISPowershellSnapin /AcceptEula /ForceReboot Add-PSSnapin WebAdministration Get-Website