To remotely restart application pools on IIS use this command:
Invoke-Command -ComputerName "computer" -ScriptBlock { Start-WebAppPool -Name "MyAppPool" }
If you wish to restart it locally you can use this:
Start-WebAppPool -Name "MyAppPool"
Invoke-Command -ComputerName "computer" -ScriptBlock { Start-WebAppPool -Name "MyAppPool" }
If you wish to restart it locally you can use this:
Start-WebAppPool -Name "MyAppPool"