Here is a puzzling issue. On some Windows Servers in my organization, if I try to run Get-WebSite
in PowerShell, I get the following output:
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
This works fine other other Windows Servers. So far, I've tested successfully on some Server 2012 and 2019.
Here is what I've checked:
- Yes. I am running Powershell as Administrator
Get-PSProvider
does NOT output an entry for WebAdministration .. .{IIS}
- Ensured the following features are installed: Web-Mgmt-Service, Web-Mgmt-Console, Web-Scripting-Tools, Web-Asp-Net45
Get-Module WebAdministration -ListAvailable
: outputs 1.0.0.0 WebAdministration`
Get-Module WebAdministration -Listavailable | Select-Object -Property Path
# output
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdministartion.psd1
At this point, I am not sure what else to try but am wondering if there's a particular bug related to Server 2016 and a GPO or enterprise antimalware service.
Any tips on troubleshooting the provider?