Need to create a
PowerShell script to recycle the
Application Pool of my
WFE - Dev,Staging & Production servers of my
SP 2013 Farm.
I tried code mentioned here
But somehow as mentioned in the blog, it seems, its applicable to
Win Server 2008 only.
Also I tried this too:
# Load IIS module: Import-Module WebAdministration # Set a name of the site we want to recycle the pool for: $site = "Default Web Site" # Get pool name by the site name: $pool = (Get-Item "IIS:\Sites\$site"| Select-Object applicationPool).applicationPool # Recycle the application pool: Restart-WebAppPool $pool
Don't know what I am missing here