Guy’s Tool Kit
Here is a selection of useful tools for Windows Server in general, and VBScripting in particular.
Contents of Guy’s VBScript Tool Kit
- ADSI – Check LDAP properties
- Cacls – Set permissions
- CDVDE – Bulk import / export accounts
- Free WMI Monitor
- LDIFDE – Bulk import / export accounts
- Link Checker
- NetSh – Network Shell
- OH (Open Handles)
- StringConverter.exe – LDIFDE Password generator
- Windiff – Compares two files
Guy Recommends: The Free IP Address Tracker (IPAT)
Calculating IP Address ranges is a black art, which many network managers solve by creating custom Excel spreadsheets. IPAT cracks this problem of allocating IP addresses in networks in two ways:
For Mr Organized there is a nifty subnet calculator, you enter the network address and the subnet mask, then IPAT works out the usable addresses and their ranges.
For Mr Lazy IPAT discovers and then displays the IP addresses of existing computers. Download the Free IP Address Tracker
ADSI edit is a wonderful tool for displaying the LDAP properties of Active Directory objects. There will be countless times when you need to know or to check the LDAP properties in your script, so take the time to explore ADSI edit.
If you use ADSI you will see that there are three container objects in Active Directory.
Download ADSI in .zip format.
Cacls – Control those permissions.
Cacls is a command line program that will set file permissions. Cacls is most useful when used with scripts. As with NetSh, I prefer to use a GUI to adjust permissions. The simple explorer is wonderful if you need to set NTFS permissions on files or folders. However, come that day when you need to script changes to files or folders, then Cacls is handy.
Before your download, go to the command prompt and type cacls, your system may already have it installed.
CMDHere – from the Resource kit.
Imagine you are using explorer. Suddenly, you need to open a folder in a ‘DOS Box. It is frustrating to run CMD, change directory about 7 times before you navigate to the right folder. Install CMDHere and make it one click to your ‘DOS Box’. See Diagram 1.
Ideal for importing and exporting user accounts to and from Active Directory. See more about CSVDE here.
Similar to CSVDE, but also allows passwords to be imported using the unicodePwd attribute. See more about LDIFDE here.
Link Check Wizard (ChkLnks.exe) is a tool that scours all drives for broken links. When it finds a dead LNK file the Wizard gives you the option to delete the broken shortcut. This utility works equally well on Windows 2003 and XP machines. I am willing to bet you find at least 5 links when you run ChkLnks.exe.
Download ChkLink here.
The idea is to run a network shell. Frankly, I prefer a GUI, however if you have no convenient remote access then I admit – NetSh is useful. (Perhaps Terminal Server or Remote Desktop are unavailable).
After installing NetSh and its NETSHELL.DLL in the %SystemRoot%\window32 directory, try NetSh at the command prompt. ‘Set’ ‘Show’ and ‘Help’ are three of the most useful commands.
NetSh is a tricky program to use. One of the most useful command is to run NetSh on a remote machine, this is how you do it:
You Type (you see this)
netsh> set machine yourmachine [yourmachine] netsh>
OH (Open Handles) is a built-in tool that shows the handles of all open windows. This command-line utility is useful for troubleshooting sharing violations, what it does is find the process that has a file open when a sharing violation occurs. What you can do is discover information about a specific process, object type, or object name.
One drawback is that to get OH working you need to type OH +otl (Object Type Lists), then reboot.
Download OH.exe here.
Robust copy is the last word in command line copying. The syntax can be demanding so store the commands in a batch file.
Download Robocopy here.
Scriptomatic is a handy utility to create your own scripts. This scripting tool is one of Microsoft’s best kept secrets.
Download Scriptomatic here
The syntax of stringconverter is: stringconverter \"NewPassword\" /encode /unicode
To make it easier to manipulate the encrypted password, ‘pipe’ the output to a text file, now you can copy the encrypted password into your data file.
- Type: stringconverter \"NewPassword\" /encode /unicode > cryptic.txt
- Type: Notepad cryptic.txt, this reveals the encrypted word IgBOAGUAdwBQAGEAcwBzAHcAbwByAGQAIgA=
- Substitute that on the theUnicodePwd:: line of your .ldp file.
Wonderful program for killing programs, all you need is the image name e.g.
taskkill /im wscript.exe
Windows 2003’s TaskKill is probably son of Kill in W2K and previous systems
Download TaskKill here.
Here is a command line version of Task manager
Download Tasklist Here
It is actually built-in to Windows 2000, 2003 and XP.
Download WBEMTEST in .zip format.
Compares two files, and highlights differences. Useful for detecting registry changes.
Download Windiff in .zip format.
WinExit is a special screen saver that logs off the current user if the are idle for say 30 minutes. In principle WinExit is just like any other screen saver. However it does have some rather good configuration settings, so before implementing, right-click, Configure and decide if wish to forcibly log off users even if it means they will lose work. My mate ‘Mad Mick’ loves the setting where he can set the user’s a Logoff message. For example, ”You have been logged of by ‘Mad Mick Franklin.
Download WinExit here.
These clients do not run VBScripts unless you apply thisadd-on. SCR66en