Вывод сведений об ограничениях сайта

param($computer="localhost", [switch]$help)

function funHelp()
{
$helpText=@"
DESCRIPTION:
NAME: GetSiteLimits.ps1
Gets a listing of site limits on a local or or remote machine. 

PARAMETERS: 
-computer  Specifies the name of the computer to run the script
-help      prints help file

SYNTAX:
GetSiteLimits.ps1

Gets a listing of site limits on local computer

GetSiteLimits.ps1 -computer "webserverII"

Gets a listing of site limits on web server named webserverII. 

GetSiteLimits.ps1 -help

Prints the help topic for the script

"@
 $helpText
 exit
}

if($help)      { "Printing help now..." ; funHelp }


$server = Get-WmiObject -Namespace root\webadministration `
             -computername $computer -class server
$server.SiteDefaults.limits.maxconnections
$server.SiteDefaults.limits.ConnectionTimeout
$server.SiteDefaults.limits.MaxBandwidth 
Интересное на сайте: 
0
Голосов пока нет

Оставить комментарий