Posted in
Windows Powershell |
No Comment | 2,290 views | 12/07/2015 11:42
These are IIS Application Pool properties that you can get using CIM via PowerShell.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| # WebSite AppPool Information
$WebSiteAppPools = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsApplicationPoolSetting" -OperationTimeoutSec 15 -EA Stop
$WebSiteAppPool = $WebSiteAppPools[0];
# IIS AppPool General Information
[string]$WebSiteAppPoolName = $WebSiteAppPool.Name
[string]$WebSiteAppPoolAppPoolAutoStart = $WebSiteAppPool.AppPoolAutoStart
[string]$WebSiteAppPoolAppPoolCommand = $WebSiteAppPool.AppPoolCommand
[string]$WebSiteAppPoolAppPoolIdentityType = $WebSiteAppPool.AppPoolIdentityType
[string]$WebSiteAppPoolAppPoolQueueLength = $WebSiteAppPool.AppPoolQueueLength
[string]$WebSiteAppPoolWAMUserName = $WebSiteAppPool.WAMUserName
[string]$WebSiteAppPoolWAMUserPass = $WebSiteAppPool.WAMUserPass
[string]$WebSiteAppPoolWin32Error = $WebSiteAppPool.Win32Error |
# WebSite AppPool Information
$WebSiteAppPools = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsApplicationPoolSetting" -OperationTimeoutSec 15 -EA Stop
$WebSiteAppPool = $WebSiteAppPools[0];
# IIS AppPool General Information
[string]$WebSiteAppPoolName = $WebSiteAppPool.Name
[string]$WebSiteAppPoolAppPoolAutoStart = $WebSiteAppPool.AppPoolAutoStart
[string]$WebSiteAppPoolAppPoolCommand = $WebSiteAppPool.AppPoolCommand
[string]$WebSiteAppPoolAppPoolIdentityType = $WebSiteAppPool.AppPoolIdentityType
[string]$WebSiteAppPoolAppPoolQueueLength = $WebSiteAppPool.AppPoolQueueLength
[string]$WebSiteAppPoolWAMUserName = $WebSiteAppPool.WAMUserName
[string]$WebSiteAppPoolWAMUserPass = $WebSiteAppPool.WAMUserPass
[string]$WebSiteAppPoolWin32Error = $WebSiteAppPool.Win32Error
You can find more properties in my blog.