Stop and Start App Pool in IIS7 with batch

I am trying to use:
%windir%\system32\inetsrv\appcmd stop apppool /apppool.name: DSS

but get the error, The attribute "apppool.name" is not supported in the current command usage

Also I cannot stop the default web site with this:

%windir%\system32\inetsrv\appcmd stop "Default Web Site"
davidthegnome20032Asked:
Who is Participating?
 
Kyle AbrahamsConnect With a Mentor Senior .Net DeveloperCommented:
from here:
http://technet.microsoft.com/en-us/library/cc732742%28WS.10%29.aspx

%systemroot%\system32\inetsrv\APPCMD stop apppool /apppool.name:DSS
0
 
davidthegnome20032Author Commented:
I fixed the stop start of app pools by removing the space after apppool.name:

Still cant get the web site to start and stop
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
for a site:
from here: http://technet.microsoft.com/en-us/library/cc772137(v=ws.10).aspx

appcmd stop site /site.name:"Default Web Site"
0
 
davidthegnome20032Author Commented:
Was able to start and stop default web site

%windir%\system32\inetsrv\appcmd start site /site.name:"Default Web Site"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.