Setting up MS Visual Studio to compile/upload?

If you set build.verbose and upload.verbose to true in your preferences file, you'll get the command lines that the IDE is using to compile and upload your sketch. That should help get you started.