PowerShell Question

Obtaining the identity of the app pool

Given a specific app pool, is there a way to get the identity associated with it?

enter image description here

In the image above, I am trying to get the "NetworkService".

I've tried the following:

Import-Module WebAdministration
Get-Item IIS:\AppPools\DeFaultAppPool|Select-Object *


However, identity is nowhere to be found:

enter image description here

is there a way to get the identity associated with it?

Answer

It can be found under processModel.identityType:

(Get-Item IIS:\AppPools\DefaultAppPool).processModel.identityType