1

I find the appcmd CLI inscrutable, and so will often do more esoteric operations once locally in the server-manager, then look at the various changes to the config files that happen so I can perform them by hand or script.

I could swear I've seen a screenshot of someone generating the appcmd invocations based on an already-created-and-configured site from IIS Server Manager.

Is that possible (and if so, how??), or was I dreaming? I've googled for things like "iis7 generate appcmd" to no avail so far.

2
  • I haven't heard of such an approach before, but ehh... The appcmd cli is pretty straightforward if you ask me. What is your problem with it? Jan 4, 2012 at 11:32
  • Its syntax is very verbose and finicky; I don't find it very intuitive at all. It's tightly coupled to the configuration-file format, rather than the concepts (once you get into more granular detail than appcmd add site ... anyhow). Jan 4, 2012 at 13:49

2 Answers 2

2

Yes, navigate in IIS manager to the level of the site you want to change and then open the Configuration Editor.

That will take you into a different view of the IIS 7 configuration system based on the schema, in a key/value/collection style interface.

Find the item you want to change - you may need to invoke sub dialogs or open sub-collections to do this.

Try clicking around things shown as numbered collections.

When you find the thing you want to change, set the value (which will then appear in bold).

When you've made the changes you want, don't press Apply in the right-hand Actions pane - hit Generate Script instead.

In the tabbed dialog that appears, switch to the AppCMD tab, and that can be copied and pasted as a working command line. It does C# and Javascript too.

1
  • thanks to Tristan for the amplification! I was a bit rushed.... Jan 10, 2012 at 15:26
0

Other than Configuration Editor (above), which does exactly what you're describing, there's also a tool called APPCMDUI , which helps by providing autocomplete-like behaviour for APPCMD.

You need to work with its idea of what the syntax should be (and it turns out APPCMD is more flexible than you might think in terms of the symbols it regards as being "similar"), but it can help construct more complicated commands.

But Configuration Editor is definitely awesome.

You must log in to answer this question.

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