Garry
Garry

Reputation: 35

Get-IISAppPool Property "Status" is always empty

When I type in Get-IISAppPool the Status property is always empty.

Get-IISAppPool | Select-Object Status

The application pools are running, and the names are correct.

Does anyone know why?

I'm not the creator of the application pools, could that be the reason?

Upvotes: 1

Views: 3522

Answers (2)

Jalpa Panchal
Jalpa Panchal

Reputation: 12799

If you want to know the status of the particular application pool using the powershell command.

Open PowerShell as administrator.

enter image description here

Run below command:

Get-WebAppPoolState -Name sample1

enter image description here

Note: Check the name of the application pool you used in command that is available or not.

Regards, Jalpa

Upvotes: 2

boxdog
boxdog

Reputation: 8442

Status is not a property of the returned objects. This is a calculated property for the default table output. If you run this command:

Get-IISAppPool | Get-Member

You will see there is no Status property. There is, however, a State property, which, I guess, is where the default view gets it's value:

State Property Microsoft.Web.Administration.ObjectState State {get;}

In fact, if you look at the member information, apart from Name, none of the items in the default view appear as properties - well, they do, but under different names.

Upvotes: 7

Related Questions