常用DOS命令

    xiaoxiao2026-08-16  3

    IIS应用改程序池

    c:\windows\system32\inetsrv\AppCmd.exe stop apppool /apppool.name:"DefaultAppPool" c:\windows\system32\inetsrv\AppCmd.exe start apppool /apppool.name:"DefaultAppPool" c:\windows\system32\inetsrv\AppCmd.exe start apppool /apppool.name:"DefaultAppPool"

    c:\windows\system32\inetsrv\AppCmd.exe list apppool 应用程序池列表 

    修改应用程序池标识:

    exec master..xp_cmdshell 'c:\windows\system32\inetsrv\AppCmd.exe set apppool "BocAppPool" /processModel.identityType:"NetworkService" '

    新增 'c:\windows\system32\inetsrv\AppCmd.exe add apppool /name:BocAutoDownAppPool /managedRuntimeVersion:"v2.0" /managedPipelineMode:"Integrated" '

    DefaultAppPool 对应于应用程序池名称

    服务 exec master..xp_cmdshell 'sc query BocAutoDownService' exec master..xp_cmdshell 'sc stop BocAutoDownService' exec master..xp_cmdshell 'sc start BocAutoDownService' 读取文件 exec master..xp_cmdshell 'type "D:\Program Files (x86)\默认公司名称\BocAutoDownSetUp\LOGS\服务日志.txt"' 加载文件夹内容 exec master..xp_cmdshell 'dir "D:\Program Files (x86)\默认公司名称\BocAutoDownSetUp\"' 远程文件复制 master..xp_cmdshell 'net use Y: \\192.168.1.333\SourcePath pwd /user:username' exec master..xp_cmdshell 'xcopy "D:\Program Files (x86)\默认公司名称\BocAutoDownSetUp\Common.dll" Y:\' 删除文件 exec master..xp_cmdshell 'del "D:\Program Files (x86)\默认公司名称\BocAutoDownSetUp\Common.dll"'

    重启IIS

    然后输入iisreset /stop 停止IIS

    输入iisreset / start 启用IIS

    重启PC shutdown.exe -r -t 5

    转载请注明原文地址: https://ju.6miu.com/read-1311228.html
    最新回复(0)