Остановить pools iis через Powershell
Import-Module WebAdministration if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } $AppPools=Get-ChildItem IIS:\AppPools | Where {$_.State -eq "Started"} ForEach($AppPool in $AppPools) { Stop-WebAppPool -name $AppPool.name # Write-Output ('Stopping Application Pool: {0}' -f $AppPool.name) }
Запустить pools iis через Powershell
Import-Module WebAdministration if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } $AppPools=Get-ChildItem IIS:\AppPools | Where {$_.State -eq "Stopped"} ForEach($AppPool in $AppPools) { Start-WebAppPool -name $AppPool.name # Write-Output ('Starting Application Pool: {0}' -f $AppPool.name) }
Similar Posts:
- Как удалить site и pools из windows iis с помощью powershell.Deleting sites and application pools from Microsoft IIS using PowerShell
- Как открыть профиль пользователя без монтирования (vhdx) user profile disk.
- Как сделать плановую перезагрузку серверов RD host windows 2016, со снятием нагрузки и возвращением её после ребута.
- Как мониторить количество пользователей 1c web клиент.
- Как установить winlogbeat для elk kibana на windows server