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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Powershell | No Comment | 1,271 views | 16/08/2015 17:30

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

1
2
3
4
5
6
7
8
9
10
11
12
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
 
$WebSite = $WebSites[0];
 
# WebSite Directory Browsing Information
[string]$WebSiteEnableDirBrowsing = $WebSite.EnableDirBrowsing
[string]$WebSiteDirBrowseShowDate = $WebSite.DirBrowseShowDate
[string]$WebSiteDirBrowseShowExtension = $WebSite.DirBrowseShowExtension
[string]$WebSiteDirBrowseShowLongDate = $WebSite.DirBrowseShowLongDate
[string]$WebSiteDirBrowseShowSize = $WebSite.DirBrowseShowSize
[string]$WebSiteDirBrowseShowTime = $WebSite.DirBrowseShowTime

You can find more properties in my blog.


Posted in Windows Powershell | No Comment | 969 views | 27/07/2015 17:36

These are IIS Website Authentication 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
# Get WebSites
$WebSites = Get-CimInstance -Namespace "root\MicrosoftIISv2" -ClassName "IIsWebServerSetting" -OperationTimeoutSec 15 -EA Stop
 
$WebSite = $WebSites[0];
 
# WebSite Authentication Information
[string]$WebSiteAuthAdvNotifyDisable = $WebSite.AuthAdvNotifyDisable
[string]$WebSiteAuthAnonymous = $WebSite.AuthAnonymous
[string]$WebSiteAuthBasic = $WebSite.AuthBasic
[string]$WebSiteAuthChangeDisable = $WebSite.AuthChangeDisable
[string]$WebSiteAuthChangeUnsecure = $WebSite.AuthChangeUnsecure
[string]$WebSiteAuthFlags = $WebSite.AuthFlags
[string]$WebSiteAuthMD5 = $WebSite.AuthMD5
[string]$WebSiteAuthNTLM = $WebSite.AuthNTLM
[string]$WebSiteAuthPassport = $WebSite.AuthPassport
[string]$WebSiteAuthPersistence = $WebSite.AuthPersistence
[string]$WebSiteAuthPersistSingleRequest = $WebSite.AuthPersistSingleRequest

You can find more properties in my blog.