- Start your windows PowerShell on your computer.
- Right click and select Run as administrator option.
- Paste the below script on the PowerShell window and click the enter button.
- Check your SharePoint site Feature will activated successfully.
- function IISReset
- {
- try
- {
- $spServers = Get - SPServer | ?
- {
- $_.Role - eq "Application"
- }
- foreach($spServer in $spServers)
- {
- Write - Host " IIS Reset in server is Processing $spServer" - f blue
- iisreset $spServer / noforce "\\"
- $_.Address
- iisreset $spServer / status "\\"
- $_.Address
- }
- Write - Host "IIS Reset has been completed successfully!!" - f blue
- } catch [System.Exception]
- {
- write - host - f red $_.Exception.ToString()
- }
- }
- Start - SPAssignment– Global# Calling the
- function
- IISReset
- Stop - SPAssignment– Global
- Remove - PSSnapin Microsoft.SharePoint.PowerShell
Check the the sharepoint server and IIS application Pool has been started or stopped.
Thanks for reading my blogs.