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.

Peter Mounce
  • 1,243
  • 4
  • 16
  • 28
  • 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? – Mathias R. Jessen Jan 04 '12 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). – Peter Mounce Jan 04 '12 at 13:49

2 Answers2

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.

TristanK
  • 8,953
  • 2
  • 27
  • 39
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.

TristanK
  • 8,953
  • 2
  • 27
  • 39