I am using below line of code to retrieve all the virtual directories
Get-WebVirtualDirectory -site 'Default Web Site' -Application "AppName"
but it gives me below error.
get-webconfiguration : 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:1
+ Get-WebVirtualDirectory -site 'Default Web Site' -Application "ehrms"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WebConfiguration], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.GetConfigu
Can somebody help. i am running this command on windows server 2012
Thanks