17

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. )
25

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.

  • 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 Jun 29 '10 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 Jun 29 '10 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 Jun 29 '10 at 18:30
  • Failed to process input: The parameter 'Services' must begin with a / or - (HRESULT=80070057). – stimpy77 Jun 29 '10 at 19:35
7

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.
  • 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. – Techgration Aug 28 '15 at 14:15
  • Any ideas on why this would recycle the pool instead of stopping it? – alex May 29 '19 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.