I am trying to run Get-Website cmdlet in Powershell(x86) on Windows Server 2012 R2 Standard 64-bit operating system. I get the following error.

$webSite1 = Get-Website -Name "Default Web Site"
Get-Website : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F B2E1-6AF00DC944A6} failed
due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At line:1 char:14
+ $webSite1 = Get-Website -Name "Default Web Site"
+              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-Website], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.GetWebsite Command

Can anyone suggest me how to execute these commands or any alternative way to control IIS sites using PowerShell?

  • You could use .\appcmd.exe list site "Default Web Site", appcmd.exe seems to work in 32bit. I don't really see why anybody would use a 32bit PowerShell to administrate a server. – Peter Hahndorf Apr 20 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.