Problem in executing get-WebAppPoolState cmdlet [Answered]RSS

1 reply

Last post Mar 03, 2016 06:12 AM by Jean Sun

  • Problem in executing get-WebAppPoolState cmdlet

    Mar 02, 2016 05:11 AM|Manjunathan R|LINK

    Hi All,

    am trying to get the AppPool status of my application using powershell script.

    while doing so am getting an exception as below

    get-webitemstate : 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:12 char:11
    +        If((get-WebAppPoolState -name $appPoolName).Value -eq "Stopped")
    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-WebItemState], COMException
        + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.GetItemStateCommand
    

    i have executed the script in both 32 as well as 64 bit.

    am using Powershell version 3.0 and running the script directly from powershell ise

    Pls advice

  • Re: Problem in executing get-WebAppPoolState cmdlet

    Mar 03, 2016 06:12 AM|Jean Sun|LINK

    Hi,

    Have you installed the IIS PowerShell snap-in? If not, please download and install IIS PowerShell snap-in via http://www.iis.net/downloads/microsoft/powershell

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.