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