====================================================================================
'Thank you for using the practical function program developed by ASP001 Studio
'HTTP://WWW.ASP001.NET
'====================================================================================
'ASP001 Studio provides you with customized program development and enterprise Internet expansion services
'QQ: 1974229
'E-Mail: [email protected]
'For more programs download please go to HTTP://WWW.ASP001.NET
'====================================================================================
'Function introduction: Set the maximum usage level of CPU at the specified site
'This function uses ADSI and requires Administrators group user permissions
'Function name: SetCPULimitVar(Computer, SiteNum, LimitVar)
'Program Development: ASP001 Studio ChuQi
'Usage: SetCPULimitVar computer name, site number, maximum limit value (100=1%, 1000=10%)
'Example: SetCPULimitVar"LocalHost","2","2000"
'====================================================================================
FunctionSetCPULimitVar(Computer, SiteNum, LimitVar)
SetMyObj001=GetObject("IIS://"&Computer&"/W3SVC/"&SiteNum)
'Set enable CPU limits
MyObj001.CpuLimitsEnabled=True
'Set limit usage limit value
MyObj001.CpuLimitLogEvent=LimitVar
MyObj001.setinfo
SetMyObj001=Nothing
EndFunction