how can I use w3wp to start SharePoint applications from command line?

217 views Asked by At

Can anyone tell me how to use w3wp to start SharePoint applications from the command line? And provide me with a small example.

1

There are 1 answers

0
Deepak-MSFT On

You could try to run the command below in the command prompt to start the site that is hosted on the IIS.

%windir%\system32\inetsrv\appcmd start sites "Default Web Site"

If you want to start the App pool then you could use the command below.

%windir%\system32\inetsrv\appcmd start apppool "DefaultAppPool"

Output:

enter image description here

To stop the site you could use the command below.

%windir%\system32\inetsrv\appcmd stop sites "Default Web Site"

Notes:

  1. make sure you run the command prompt as an administrator.