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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting IIS WebSites Default Document Information via PowerShell using CIM
Posted in Windows Powershell | No Comment | 2,241 views | 21/03/2015 12:28

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

1
2
3
4
5
6
7
8
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
 
$WebSite = $WebSites[0];
 
# WebSite Default Document Information
[string]$WebSiteEnableDefaultDoc = $WebSite.EnableDefaultDoc
[array]$WebSiteDefaultDocs = $WebSite.DefaultDoc.Split(",")

You can find more properties in my blog.



Leave a Reply