PowerShell and IIS–Get Application in an App Pool

10. February 2015 08:30



Getting information out of IIS with PoSH is fairly straight forward thanks to the WebAdministration module. Here are commands to get the applications running in a given application pool. Note that because these commands interact with IIS they need to be run from an elevated session (right click PoSH and runas administrator).

You may need to set the execution policy before being able to run these commands.

Set-ExecutionPolicy RemoteSigned

Import the Web Administration module

Import-Module WebAdministration

Now you can run commands against the IIS namespace (or run IIS cmdlets).

Get-Item IIS:\AppPools\Default40AppPool2

About the author

I'm a .NET developer, a husband and a father of three beautiful girls.

Month List