search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting IIS WebSites via PowerShell using CIM
Posted in Windows Powershell | No Comment | 979 views | 07/07/2015 17:19

These are IIS Website properties that you can get using CIM via PowerShell.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
 
$WebSite = $WebSites[0];
 
# WebSite General Information
[string]$WebSiteId = $WebSite.Name.Split("/")[-1]
[string]$WebSiteName = $WebSite.ServerComment
[string]$WebSiteAppPool = $WebSite.AppPoolId
[string]$WebSiteMaxBandwidth = $WebSite.MaxBandwidth
[string]$WebSiteMaxConnections = $WebSite.MaxConnections
[string]$WebSiteConnectionTimeout = $WebSite.ConnectionTimeout
[string]$WebSiteCertCheckMode = $WebSite.CertCheckMode
[string]$WebSiteCGITimeout = $WebSite.CGITimeout
[string]$WebSiteCreateCGIWithNewConsole = $WebSite.CreateCGIWithNewConsole
[string]$WebSiteCreateProcessAsUser = $WebSite.CreateProcessAsUser
[string]$WebSiteClusterEnabled = $WebSite.ClusterEnabled
[string]$WebSiteContentIndexed = $WebSite.ContentIndexed
[string]$WebSiteDoStaticCompression = $WebSite.DoStaticCompression
[string]$WebSiteDoDynamicCompression = $WebSite.DoDynamicCompression
[string]$WebSiteFrontPageWeb = $WebSite.FrontPageWeb
[string]$WebSiteDisableSocketPooling = $WebSite.DisableSocketPooling
[string]$WebSiteDisableStaticFileCache = $WebSite.DisableStaticFileCache
[string]$WebSiteEnableReverseDns = $WebSite.EnableReverseDns
[string]$WebSiteShutdownTimeLimit = $WebSite.ShutdownTimeLimit
[string]$WebSiteSSIExecDisable = $WebSite.SSIExecDisable
[string]$WebSiteSSLAlwaysNegoClientCert = $WebSite.SSLAlwaysNegoClientCert
[string]$WebSiteUploadReadAheadSize = $WebSite.UploadReadAheadSize
[string]$WebSiteUseDigestSSP = $WebSite.UseDigestSSP

You can find more properties in my blog.



Leave a Reply