Posted in
Windows Powershell |
No Comment | 2,448 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(",") |
# 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.