Windows Server 2016 上不提供 WebAdministration 提供程序

Windows Server 2016 上不提供 WebAdministration 提供程序

这是一个令人费解的问题。在我组织中的某些 Windows Server 上,如果我尝试Get-WebSite在 PowerShell 中运行,则会得到以下输出:

PS C:\Users\me> Get-Website
Attempting to perform the Start operation on the 'WebAdministration' provider failed. Arithmetic operation resulted in an overflow.
Get-Website : Cannot find a provider with the name 'WebAdministration'.
At line:1 char:1
+ Get-Website
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (WebAdministration:String) [Get-Website], ProviderNotFoundException
    + FullyQualifiedErrorId : ProviderNotFound,Microsoft.IIs.PowerShell.Provider.GetWebsiteCommand

这在其他 Windows Server 上也能正常工作。到目前为止,我已经在某些 Server 2012 和 2019 上成功测试。

以下是我检查过的内容:

  1. 是的。我以管理员身份运行 Powershell
  2. Get-PSProvider不输出条目WebAdministration .. .{IIS}
  3. 确保安装了以下功能:Web-Mgmt-Service、Web-Mgmt-Console、Web-Scripting-Tools、Web-Asp-Net45
  4. Get-Module WebAdministration -ListAvailable:输出 1.0.0.0 WebAdministration`
  5. Get-Module WebAdministration -Listavailable | Select-Object -Property Path
    # output
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdministartion.psd1
    

此时,我不确定还能尝试什么,但想知道是否存在与 Server 2016 和 GPO 或企业反恶意软件服务相关的特定错误。

关于解决提供商问题有什么建议吗?

相关内容