如何远程重启 IIS7 应用程序池
请注意,源计算机和目标计算机在 Windows 2008 Server R2 中运行 IIS7,因此必须使用 Powershell。
谢谢!
最佳答案
您需要从远程计算机运行以下命令来重新启动 IIS7 应用程序池:
Invoke-Command -ComputerName "webserver_computerName" -Credential $credentials_from_last_step -ScriptBlock { Add-PSSnapin WebAdministration; Restart-WebItem 'IIS:\AppPools\DefaultAppPool' }
请使用这个link它可以帮助您使用 PowerShell 远程控制 IIS7。
有关 Restart-WebItem 的更多信息是 here :
Restart-WebItem => 重新启动应用程序池或网站。
关于iis-7 - 如何远程重启 IIS7 应用程序池,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10634432/