Posted in
Windows Powershell |
No Comment | 1,243 views | 17/06/2015 17:40
These are IIS Website Script Map properties that you can get using CIM via PowerShell.
1
2
3
4
5
6
7
8
9
10
11
| # Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
$WebSite = $WebSites[0];
# WebSite Script Map Information
$WebSiteScriptMap = $WebSite.ScriptMaps[0]
[string]$WebSiteScriptMapExtensions = $WebSiteScriptMap.Extensions
[string]$WebSiteScriptMapFlags = $WebSiteScriptMap.Flags
[string]$WebSiteScriptMapIncludedVerbs = $WebSiteScriptMap.IncludedVerbs
[string]$WebSiteScriptMapScriptProcessor = $WebSiteScriptMap.ScriptProcessor |
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
$WebSite = $WebSites[0];
# WebSite Script Map Information
$WebSiteScriptMap = $WebSite.ScriptMaps[0]
[string]$WebSiteScriptMapExtensions = $WebSiteScriptMap.Extensions
[string]$WebSiteScriptMapFlags = $WebSiteScriptMap.Flags
[string]$WebSiteScriptMapIncludedVerbs = $WebSiteScriptMap.IncludedVerbs
[string]$WebSiteScriptMapScriptProcessor = $WebSiteScriptMap.ScriptProcessor
You can find more properties in my blog.