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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting IIS WebSites Directory Browsing via PowerShell using CIM
Posted in Windows Powershell | No Comment | 1,512 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.



Leave a Reply