How to execute WebAdministration cmdlets on Powershell x86

0

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?

windows
windows-server-2012-r2
powershell
x86
x86-64
asked on Server Fault Apr 20, 2020 by Sameera

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0