Wednesday, March 25, 2009

PowerShell 1.0 / WMI / IIS 6.0

Here are a few simple PowerShell 1.0 scripts for collecting info from IIS (6.0 on Windows Server 2003 in my case). I'm putting here primarily for my own reference, but hopefulle someone else will find them useful.

write-host "### -----"
$t = get-wmiobject IISWebVirtualDir -namespace "root\MicrosoftIISv2"
$t | ft AppPackageID, AppPackageName, AppRoot, Name
# $t | ft AppIsolated, AppPackageID, AppPackageName, AppRoot, Caption, ' Description, InstallDate, Name, Status
renders


$t = get-wmiobject IISWebVirtualDirSetting -namespace "root\MicrosoftIISv2"
$t | ft AppFriendlyName, Name, Path, Realm
# $t | ft AppIsolated, AppPackageID, AppPackageName, AppRoot, Caption, ' Description, InstallDate, Name, Status
renders

No comments: