Tools that can help a lot but don’t cost a lot
To automate systems administration tasks, scriptwriters often use command-shell tools. However, there are a number of GUI tools that are supporting actors in the cast of scripting tools. Here's a countdown of my 10 favorite GUI tools and how I use them in my scripting environment. Even if you don't write scripts, you'll probably find these tools useful.
Smaller Animals Software's DirCase (http://www.smalleranimals.com) is a free utility that lets you uppercase or lowercase the names of all the files in a folder at once. You can configure the utility to include subfolders or set up a filter to target specific files based on their extension or other criteria. If you have a large folder of script output files or Web files for which you need to change the case for proper handling, this tool makes that task very simple.
9. Active CPU
If you simultaneously run several scripts or utilities on your administrative PC or server, you probably check Task Manager or Performance Monitor occasionally to see your CPU utilization. Although Task Manager adds a small graphic in the system tray that shows CPU utilization, this graphic doesn't appear unless Task Manager is on.
Instead of using Task Manager, I like to use SmartLine's Active CPU (ACPU—http://www.protect-me.com/freeware.html). This freeware automatically starts up when you turn on your computer and displays a miniature CPU-usage gage in the system tray. When you hover your mouse over the gage, ACPU displays a text balloon that states the exact percentage of processor use.
If you work with the registry regularly and want to have a better registry manipulation tool, try DC Software Design's RegEditX (http://www.dcsoft.com). This free utility extends regedit's capabilities so that you can work faster and more efficiently when you're creating scripts that manipulate the registry. For example, the tool's combo box lets you cut, copy, and paste registry paths to and from the Windows clipboard. When you paste a registry path into the combo box, RegEditX automatically opens that registry key or subkey in regedit. RegEditX also automatically resizes columns so you don't have to manually resize them.
A companion tool for RegEditX is 4Developers' Registry Crawler (http://www.4developers.com). You can use this low-cost tool ($39.95 for a single-user license) to easily perform advanced searches of registries on local and remote machines.
7. Random Password Generator-PRO
For several years, I used a free Perl-based command-line password generator. Although it served me well, there were many occasions when I could've used a more robust feature set. Recently, I discovered Hirtle Software's Random Password Generator-PRO (http://www.hirtlesoftware.com). This low-cost tool ($29.95 for a single-user license) provides the password-generation features I've been looking for.
When setting up the password criteria, you can choose from uppercase and lowercase letters, numbers, and symbols, for a total of 94 possible characters. More important, you can exclude specific symbols, which means you can exclude symbols that might be interpreted as reserved characters in scripts. You can configure a specific password length (up to 60 characters) or length range (e.g., 10 to 15 characters long) and create rules to make the generated passwords include specific character types (e.g., numbers, symbols) at specific locations. You can even include spaces if you want to use password phrases. Random Password Generator-PRO supports Windows strong passwords.
Other features include a dictionary check (which rejects any password prone to a dictionary attack), a duplication check (which eliminates any duplicate password), and a random word generation mode (which outputs easier-to-remember passwords that are broken into word sections). You can save the generated passwords to a text or comma-separated value (CSV) file, which can then become the input file for an administrator password change script.
I'm always emailing scripts and input files to other systems administrators, so I'm constantly zipping and unzipping files. I've found a handy archiving tool—ConeXware's PowerArchiver (http://www.powerarchiver.com)—that lets me easily create and attach zip files to email messages. PowerArchiver is integrated with Windows Explorer and adds a nice set of six right-click options for file encryption, compression, and transmission (via email or FTP). I've become so dependent on this tool that I feel lost without it. It's definitely a huge time saver that happens to be very easy on the budget ($19.95 for a single-user license).
ConeXware also offers PowerArchiver Command Line (PACL), a command-line version of PowerArchiver. PACL is free to PowerArchiver licensees, or you can purchase it separately ($7.95 for a single-user license).
5. Agent Ransack
Mythicsoft's Agent Ransack (http://www.mythicsoft.com) is a powerful utility that lets you search for files in one or more folders on local and remote machines. With this tool, you can search for files of a certain size or perform regular-expression searches on filenames and file contents. In fact, the Help file includes a helpful explanation of how to use regular expressions. After you have a list of files that match your search criteria, you can dump the filenames to a text file, which you can then use as an input file for a script.
Agent Ransack is a freeware version of Mythicsoft's FileLocator Pro. This inexpensive program ($24.95 for a single-user license) offers more features, including additional output types, .zip and .pdf file searching, reverse sorting, and a built-in file viewer.
4. DameWare Exporter
Have you ever had to dump information about all the user accounts on a single server, multiple servers, or a domain? Have you ever needed to dump data about a node's groups and their memberships? When you must perform such tasks on the same machines or nodes repeatedly, you can create a scripted solution. However, for one-time or infrequent dumps, creating a script isn't an efficient solution.
For one-time or infrequent dumps, I use DameWare Development's DameWare Exporter (http://www.dameware.com). This low-cost utility ($49.95 for a single-user license) has great data-export features and outputs the gathered data to a tab-delimited or CSV output file. You can dump information about domains, computers, disk drives, groups, printers, members, services, shares, software, and users from remote Windows Server 2003, Windows XP, Windows 2000, or Windows NT nodes. After DameWare Exporter has done all the hard work, you can open the output file in Microsoft Excel and easily manipulate the results or use a script to perform filtering and sorting.
3. TreeSize Professional
Systems administrators often must manage disk utilization and storage space. Locating directories that are no longer in use, performing cleanups, monitoring utilized space, and capturing file ownership are typical management tasks. I've come to rely on JAM Software's TreeSize Professional (http://www.jam-software.com) to help with these tasks. This inexpensive tool ($39.95 for a single-user license) works with Windows 2003, XP, Win2K, and NT. TreeSize scans your directories and uses 3-D bar and pie charts to give you a visual picture of which folders are the largest. It can also provide detailed information (e.g., last access date, owner, NTFS compression rate) for selected drives or directories. The tool's command-line interface lets you schedule regular scans of your drives or directories. Other TreeSize features that I find particularly helpful are the Windows Explorer-like columns that show folder sizes and the ability to include or exclude files in scans based on file extensions or filename patterns.
You can export TreeSize's results to an Excel, HTML, or text file. I typically export the results to an .xls or .txt file, then use a script to parse the file's results.
A big downside of editing scripts in Notepad or another text editor is that the built-in Windows clipboard holds only a single item. This setup is prone to accidental overwrites. For example, if you cut out a large section of code to move it but then forget that it's on the clipboard, you can easily overwrite it by cutting or copying another piece of code. Even an Undo button won't help out with this problem.
To avoid this problem, you can use an enhanced clipboard. I like CLIPTRAY, a free utility available at http://cliptray.f2o.org, because it resides in the system tray and lets you see 20 items by default. (You can configure it to show fewer or more items.) CLIPTRAY supports not only text but also images, files, folders, and other items you might place on the clipboard. Double-clicking the tool's icon in the system tray lets you see the saved clipboard items and actually view the items' contents. With CLIPTRAY, I'm able to put a number of code snippets on the clipboard and extract them as I need them, with no worries about losing anything due to an accidental clipboard overwrite.
1. SAMenu Explorer
Have you ever needed to enter a file or folder path at the command line or in a script? Smaller Animals Software's SAMenu (http://www.smalleranimals.com) lets you do so with ease. This free utility adds an entry named SAMenu to the dialog box that appears when you right-click a file or folder. When you select this entry, a drop-down menu appears that has five options:
- Copy Path to Clipboard (copies the path to the selected files or folders to the clipboard)
- Change Dates (changes the modification and access dates for selected files)
- New Folder (creates a new folder)
- Change R/W Permissions (changes read/write permissions on files or folders)
- Rename All (renames files or folders using a renaming template)
The option I use most frequently is Copy Path to Clipboard. With this option, you can quickly copy and paste the path to the selected file or folder right into a script or command line. More important, it eliminates mistyped paths. If you've installed CLIPTRAY, SAMenu will hold the path in the CLIPTRAY history until you need it again.
Add to Your Scripting Repertoire
I've given you 10 of my favorite GUI tools to add to your scripting repertoire. Using these tools in your scripting environment can improve the time and ease with which you create and run your scripting masterpieces.