Posted in
Windows Powershell |
No Comment | 1,113 views | 15/08/2015 17:55
These are IIS Application Pool Periodic Restart 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 Periodic Restart Information
[string]$WebSiteAppPoolPeriodicRestartMemory = $WebSiteAppPool.PeriodicRestartMemory
[string]$WebSiteAppPoolPeriodicRestartPrivateMemory = $WebSiteAppPool.PeriodicRestartPrivateMemory
[string]$WebSiteAppPoolPeriodicRestartRequests = $WebSiteAppPool.PeriodicRestartRequests
[string]$WebSiteAppPoolPeriodicRestartSchedule = $WebSiteAppPool.PeriodicRestartSchedule
[string]$WebSiteAppPoolPeriodicRestartTime = $WebSiteAppPool.PeriodicRestartTime
[string]$WebSiteAppPoolPingingEnabled = $WebSiteAppPool.PingingEnabled
[string]$WebSiteAppPoolPingInterval = $WebSiteAppPool.PingInterval
[string]$WebSiteAppPoolPingResponseTime = $WebSiteAppPool.PingResponseTime |
# WebSite AppPool Information
$WebSiteAppPools = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsApplicationPoolSetting" -OperationTimeoutSec 15 -EA Stop
$WebSiteAppPool = $WebSiteAppPools[0];
# IIS AppPool Periodic Restart Information
[string]$WebSiteAppPoolPeriodicRestartMemory = $WebSiteAppPool.PeriodicRestartMemory
[string]$WebSiteAppPoolPeriodicRestartPrivateMemory = $WebSiteAppPool.PeriodicRestartPrivateMemory
[string]$WebSiteAppPoolPeriodicRestartRequests = $WebSiteAppPool.PeriodicRestartRequests
[string]$WebSiteAppPoolPeriodicRestartSchedule = $WebSiteAppPool.PeriodicRestartSchedule
[string]$WebSiteAppPoolPeriodicRestartTime = $WebSiteAppPool.PeriodicRestartTime
[string]$WebSiteAppPoolPingingEnabled = $WebSiteAppPool.PingingEnabled
[string]$WebSiteAppPoolPingInterval = $WebSiteAppPool.PingInterval
[string]$WebSiteAppPoolPingResponseTime = $WebSiteAppPool.PingResponseTime
You can find more properties in my blog.
Posted in
Windows Powershell |
No Comment | 1,531 views | 14/08/2015 17:26
These are IIS Website Binding properties that you can get using CIM via PowerShell.
1
2
3
4
5
6
7
8
9
10
| # Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
$WebSite = $WebSites[0];
# WebSite Binding Information
$WebSiteBinding = $WebSite.ServerBindings[0]
[string]$WebSiteBindingHostname = $WebSiteBinding.Hostname
[string]$WebSiteBindingIP = $WebSiteBinding.IP
[string]$WebSiteBindingPort = $WebSiteBinding.Port |
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
$WebSite = $WebSites[0];
# WebSite Binding Information
$WebSiteBinding = $WebSite.ServerBindings[0]
[string]$WebSiteBindingHostname = $WebSiteBinding.Hostname
[string]$WebSiteBindingIP = $WebSiteBinding.IP
[string]$WebSiteBindingPort = $WebSiteBinding.Port
You can find more properties in my blog.