Command line confusion (what do all those brackets mean?)

So… I found out this week that a lot of folks get confused by some of our (Microsoft’s) KB and TechNet articles when we start showing examples of how to use a command line tool. Same holds true when you look at the helpfile for some of the same commands.

It is actually not just random as some folks think :-)
So here’s how this breaks down:
Text without brackets, braces, angles, etc, means items you MUST type as shown.
Text inside of <angle brackets> are a placeholder that you MUST put a value.
Text inside of [square brackets] are just optional items.

When you see items {inside of braces} these are a SET of required items, you need to pick ONE.

When you see a vertical bar like this | these are just showing mutually exclusive items, pick ONE.

When you see this (…) this indicates something that can be repeated.

For instance lets take the command line REPADMIN. The help file shows this:

repadmin <cmd> <args> [/u:{domain\user}] [/pw:{password | *}] [/retry[:<retries>][:<delay>]] [/csv]

Meaning, repadmin is obviously required. And so is providing some sort of arguement such as /syncall. Everything else is optional.

So then we would look at the help file for repadmin /syncall

repadmin /syncall <DSA> [<Naming Context>] [<flags>]

Meaning to sync the DC, you would need to type something like this:

repadmin /syncall myDomainController.mydomain.local

And optionally you can do some extra stuff like this:

repadmin /syncall myDomainController.mydomain.local /AeP

Which would cause (if you read the helpfile) myDomainController to sync all the naming contexts (NC’s) that it holds in the database enterprise wide and will Push the changes.

What’s actually funny about this one particular command (little off subject but worth mentioning) is that you can also specify the switch /q to run in quiet mode – or the /Q switch to run in REALLY quiet mode 😉

I hope this helps to clarify.