In IIS 7, appcmd.exe was added to enable a programmatic way of interacting with the IIS. On Technet, the syntax to recycle an app pool is as follows:
appcmd recycle apppool /apppool.name: stringThis will however result in the following error message:
ERROR ( message:The attribute "apppool.name" is not supported in the current command usage. )Which can feel a bit strange. I then noticed that the article on Technet has a typo and the space between /apppool.name: and the name of the application pool should not be there. Without it the command will execute perfectly.
As an addition, application pools with spaces in their names can be recycled by simply wrapping the name in quotes as so:
appcmd recycle apppool /apppool.name:"My Application Pool Name"I added a comment about the issue in the Technet article for others with the same issue. I guess there is not a way to submit corrections to articles other than comments?