[英]How to start IIS application pools which are stopped only for websites which has "Started" status using Powershell?
does anyone can point me direction how I can start IIS (7/8) application pools which are stopped only for websites which has "Started" status using Powershell (so no starting app pool for their connected application/websites which has Stopped state)?有没有人可以指点我如何启动 IIS (7/8) 应用程序池,这些应用程序池仅针对使用 Powershell 处于“已启动”状态的网站停止(因此,对于已停止状态的已连接应用程序/网站,没有启动应用程序池)?
Scenario1: Stopped app pool Started website场景 1:停止的应用程序池启动的网站
START app pool启动应用程序池
Scenario2: Stopped app pool Stopped website场景 2:停止的应用程序池停止的网站
DO NOTHING没做什么
Thanks谢谢
I don't understand the downvotes too.我也不明白downvotes。 However, you can try this:
不过,你可以试试这个:
Import-Module WebAdministration
gci IIS:\Sites |
where state -eq 'Started' |
select -ExpandProperty applicationPool |
% { Start-WebAppPool $_ }
It seems like you don't have to check whether the applicationPool is already started, but you can adopt the script and check the status using the Get-WebAppPoolState cmdlet if you think its necessary.似乎您不必检查 applicationPool 是否已启动,但如果您认为有必要,您可以采用该脚本并使用Get-WebAppPoolState cmdlet 检查状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.