28

http://technet.microsoft.com/en-us/library/cc732742(WS.10).aspx

The above URL describes how to start/stop an IIS 7 app pool. However, I have spaces in my app pool name. Double-quotes doesn't work. Ideas?

C:\Windows>C:\Windows\System32\inetsrv\appcmd stop apppool /apppool.name: My Ap
p Services
Failed to process input: The parameter 'App' must begin with a / or - (HRESULT=8
0070057).

C:\Windows>C:\Windows\System32\inetsrv\appcmd stop apppool /apppool.name: "My A
pp Services"
ERROR ( message:The attribute "apppool.name" is not supported in the current com
mand usage. )
3
  • Note: If you get the error ERROR ( message:The WAS service is not available - try starting the service first.), you'll need to re-open with Administrative Privileges
    – KyleMit
    Commented Aug 7, 2015 at 13:21
  • 1
    @KyleMit you also get this message if WAS has not been started, in which case you need to start WAS using net start was. Commented Aug 30, 2019 at 9:55
  • This is a little random (and 10 years late), but if you're trying to stop/start the App Pool back to back... you can appcmd recycle apppool /apppool.Name:"My App Services" instead. Commented Jun 23, 2020 at 21:24

4 Answers 4

42

Type appcmd list apppool, and use exactly what it lists there in your appcmd start apppool /apppool.name:

Names with spaces should be escaped with double quotes. For example:

%SYSTEMROOT%\System32\inetsrv\appcmd stop apppool /apppool.name:"My App Services"

Post the exact command you're trying to run ; perhaps you missed the colon or there's another problem with the syntax?

Edit - you're adding a space between the colon and the first double-quote. Remove that space, use the double-quote, and see what happens.

4
  • This is what happens WITHOUT quotes, where the name is "My App Services": Failed to process input: The parameter 'App' must begin with a / or - (HRESULT=8 0070057).
    – stimpy77
    Commented Jun 29, 2010 at 18:09
  • And this is what happens WITH quotes for name "My App Services": ERROR ( message:The attribute "apppool.name" is not supported in the current command usage. )
    – stimpy77
    Commented Jun 29, 2010 at 18:11
  • Stimpy - as i said, post the exact command that you're typing. - whoops - I see you edited your post to include that. Take away the initial space after the ":"
    – mfinni
    Commented Jun 29, 2010 at 18:30
  • Failed to process input: The parameter 'Services' must begin with a / or - (HRESULT=80070057).
    – stimpy77
    Commented Jun 29, 2010 at 19:35
9

The quotation marks do seem to work, however it's the space after the colon that seems to be the issue (as noted by mfinni). Here are some samples and their outputs:

c:\Windows\System32\inetsrv>appcmd start apppool /apppool.name: "Classic .NET AppPool"
ERROR ( message:The attribute "apppool.name" is not supported in the current command usage. )

c:\Windows\System32\inetsrv>appcmd start apppool /apppool.name:"Classic .NET AppPool"
"Classic .NET AppPool" successfully started.
2
  • That worked for me. I had the space in-between the colon and the quotes on the app pool name and it was throwing the error. Commented Aug 28, 2015 at 14:15
  • Any ideas on why this would recycle the pool instead of stopping it?
    – alex
    Commented May 29, 2019 at 14:55
2

Try without space after colon
It succedded for me
Even if there is space in app pool name try it with double quotes
Sample 01: appcmd start apppool /apppool.name:"ASP.NET V2.0"
Sample 02: appcmd start apppool /apppool.name:MyAppPool

1
1

in new versions of IIS you should pass apppool and site name in below format:

%systemroot%\system32\inetsrv\appcmd stop site "app_name"
%systemroot%\system32\inetsrv\appcmd stop apppool "apppool_name"

// update website's files

%systemroot%\system32\inetsrv\appcmd start apppool "apppool_name"
%systemroot%\system32\inetsrv\appcmd start site "app_name"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .