Ecco come fare il recycling di un Application Pool su IIS 7 con PowerShell

PowerShell: recycle7.ps1

# Recycling AppPoll by name (IIS7)
#
# se non funge lanciare prima da linea di comando
# Set-ExecutionPolicy RemoteSigned
# eseguire con: powershell .\recycle7.ps1

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration.ServerManager") 

$appName = "SharePoint - 80"

$s =new-object ("Microsoft.Web.Administration.ServerManager")

$p = $s.ApplicationPools | Where-Object {$_.Name -eq $appName}

$p.Recycle()
Tags:
IIS28 PowerShell199 Script85
Potrebbe interessarti anche: