Recyclepool.vbs 文件内容: appPoolName = WScript.Arguments(0) Set oWebAdmin = GetObject("winmgmts:root\WebAdministration") Set oAppPool = oWebAdmin.Get("ApplicationPool.Name='" + appPoolName + "'") oAppPool.Recycle set fso=createobject("scripting.filesystemobject") if (fso.fileexists("d:\appPool\recycleIISPool.log")) then '1-forreading,2-forwriting,8-appending set file=fso.opentextfile("d:\appPool\recycleIISPool.log",8,ture) else set file=fso.createtextfile( "d:\appPool\recycleIISPool.log",8,ture) end if 'write(x)写入x个字符,writeline写入换行,writeblanklines(n)写入N个空行 file.writeline now&" 应用程序池“"&appPoolName &"”已经回收成功。" file.close |
Recyclepool.bat文件内容: cscript D:\appPool\recyclepool.vbs platweb |
欢迎光临 度量快速开发平台-专业、快速的软件定制快开平台 (http://plat.delit.cn/) | Powered by Discuz! X3.2 |