Archive for August, 2009

This is more of a techinical post but I need to sing the praises of this wonderful free command line program from Microsoft: Robocopy.

I have used robocopy in many of the VBScripts that I have written over the years because of it’s flexiblity and well…. its robustness (Hence the name ROBOcopy)

This little program adds a a fine level of control in the way to copy files from one location to another. Some of the things you can do are:

– Mirror a folders contents to another location, deleting anything that does not belong.
– Copy files of a certian size.
– Copy files of a certain age.
– Copy files without attibutes like hidden, system or read-only.
– Copy files without the NTFS security.
– Create a log of the copy process.

The major thing that I love about this program is that it resume the copy of a large file if it is interrupted with the /z switch. This is really useful for admins that need copy files over an unstable VPN connection.

You can find more about this command at another great resource: ss64

I thought that I would fill this blog with other things that I find useful in my admin work as well.  The DSQuery and DSGet commands are really useful tools in my arsenal. These commands are great for finding AD objects and their details.

Quite simply, The DSQuery command  finds AD objects and DSGet command  gets more details about an AD object.To find a user in active directory:

Dsquery user  -name (username or partial name with wildcards)

For example:

The result of  the command:

dsquery user -name dwayne*

Will display the following:

“CN=Dwayne La Rose,OU=Tech,OU=Some other OU,DC=SomeDomain,DC=com”

You can then pipe that dquery command into a DSGet command to get more details about objects.


dsquery user -name dwayne*|dsget user -display -email -tel


Dispaly                            Tel                             email

Dwayne La Rose       (555)555-5555

This command can be used for computers,  groups, OU’s and other AD objects.

For more detail on these commands go to