Header Ads

IIS - Start,Stop and Restart from Remote PC using Power Shell or Windows Command

IIS
IIS - Start,Stop and Restart from Remote PC using Power Shell
Open a Power shell console with administrative privileges.Here is the Power Shell commands for IIS - Start,Stop and Restart on the IIS instance installed target PC.

IIS-START
invoke-command -computername "TARGET-HOST" -scriptblock {iisreset /START}
IIS-STOP
invoke-command -computername "TARGET-HOST" -scriptblock {iisreset /STOP}
IIS-RESTART
invoke-command -computername "TARGET-HOST" -scriptblock {iisreset /RESTART}

Remember to replace the TARGET-HOST sample host name with the host name or IP Address of the target PC

IIS - Start,Stop and Restart from Remote PC using Windows Command
Open a command prompt with with administrative privileges.Now we can do IIS - Start,Stop and Restart on the IIS instance installed target PC.
IIS-START
iisreset /START TARGET-HOST
IIS-STOP
iisreset /STOP TARGET-HOST
IIS-RESTART
iisreset /RESTART TARGET-HOST

Remember to replace the TARGET-HOST sample host name with the host name or IP Address of the target PC

No comments:

Powered by Blogger.