Category Archives: Batch Files

Assign a Drive Letter from the Command Line Using DiskPart

Here’s how you can assign a drive letter to a volume using the command line tool DiskPart. For more information, see this TechNet article. diskpart list volume select volume n assign letter F Hope this helps!

Posted in Batch Files, Windows, Windows 7, Windows Server 2008 R2, Windows Server 2012 | Leave a comment

Using findstr.exe to Parse Text Files – Simple “grep” for Windows

The DOS command findstr.exe can help you …find strings… in text files. In conjunction with a for loop and tokenization, you can perform actions on the match results. For example, the following command finds the string “Delivery Status Notification” in … Continue reading

Posted in Batch Files | Leave a comment

Visualize Folder Structure With Ye Olde DOS Tree Command

A couple of weeks ago, I found myself looking for a way to quickly demonstrate and visualize the folder structure of a QA system. Using the ancient DOS command “tree”, I was able to make it happen easily. The DOS … Continue reading

Posted in Batch Files | Leave a comment

Quickly Create Test Users on your Domain Controller

If you are looking for a quick way to create test users in your domain, you can do so through the old NET USER command.  You will have to run this on your domain controller’s command prompt.  The following will … Continue reading

Posted in Active Directory, Batch Files | Leave a comment