Couple command-line parameters with VBScript for maximum flexibility
Most Windows administrators rely heavily on running commands at the command line to accomplish day-to-day administrative tasks and to automate tedious, repetitive tasks. The best part about such commands is their switches (aka parameters), which let you customize the commands' behavior. The Net Use command, for example, wouldn't be as useful without its /persistent switch, and the Xcopy command would be useless without its many switches.
Many administrators also use VBScript to make their lives easierif you're reading this, you've probably written a few scripts of your own. But administrators often don't maximize the flexibility of their scripts, because most administrators don't write their scripts to take advantage of command-line switches.
For example, let's assume you've written a script called DisableUser.vbs, which Listing 1 shows, that lets you easily handle employee resignations. The script disables a user account and the user's home directory share while leaving the user's user account and home directory intact for archival and administrative purposes. . . .