Sometimes I need a quick list of all my servers. This batch file does that for me REM ====computerlist.cmd begins ===== @echo offclscd /d %TEMP%IF EXIST serverlist.txt DEL serverlist.txtREM all on one line until FOR commanddsquery * domainroot -filter “(&(objectCategory=Computer)(objectClass=Computer)(operatingSystem=*Server*))” -limit 0 -attr cn >> serverlist.txtFOR /F “skip=1” %%s in (serverlist.txt) do echo %%s >> “%USERPROFILE%\DESKTOP\serverlist.txtif…
Author: Alan
Open the CDROM tray
Neither of these subroutines are mine. I use this script typically when I am in an unfamiliar server room, or when I am remotely working on a server with local assistance. I open the CD/DVD tray to make sure that I am on the right hardware. There is a funny story about me powering off…
Get Exchange Email Information for a User
This script, GetEmailInfo.vbs, will quickly give you the email address, server, storage group and database for an Exchange user. Tags: Exchange+User+Information
A better way to search Active Directory
Create a shortcut with this as the target: %systemroot%\system32\rundll32.exe dsQuery,OpenQueryWindow Name it “Search Active Directory” In the Advanced tab you can search by select AD fields. So if you want to find Joe in Accounting in Birmingham, it looks like this: Tags: AD, Active+Directory
Another Hard drive cleanup trick
“Msizap.exe is a command line utility that removes either all Windows Installer information for a product or all products installed on a computer. Products installed by the installer may fail to function after using Msizap.” http://msdn.microsoft.com/en-us/library/aa370523(VS.85).aspx msizap G! deletes orphaned (unused) installer files. It saved me over 1 GB.
XP NT Command help file
I have a little batch file which directly launches the XP help file for NT commands: @echo offstart hh.exe ms-its:%WINDIR%\Help\windows.chm::/ntcmds.htmexit Even if you have been using XP for a long time, it is always informative to look a the topic new “command-line tools”. There are some useful tools which I never seem to remember, such…
Convert CSV files to Excel
Many of the log files I get are in CSV format. For me to view them in Excel, I have had to use the “Text to Columns” feature. One of my security applications is now sending me such a file daily. CSV2Excel.vbs converts CSV files to XLS. You can drag a CSV file onto the script…
Create a list of your OU structure
Much of IT security involves making lists of your existing structure. The Information Security Officers like to have a list of the current Organizational Units in my organization. To enumerate a list of OUs you can use OUEnum.vbs. It will create an Excel spreadsheet with all your OUs, and a basic map to see sub-OU…
NoMoreDupes Outlook Duplicate Remover
Have you ever had an Outlook synch go bad resulting in hundreds of duplicate messages? I have. The product I used to fix it was Wisco’s NoMoreDupes, http://www.nomoredupes.com/. The $30 was worth the time it would have taken me to fix the issue (or even write a script). Wisco is currently running a 20% off promotion. Use…
Membership in Builtin and Admin Groups
Nested groups can cause some unpleasant surprises when you are auditing membership in Active Directory Builtin Groups. BuiltInGroupsEnum.vbs will enumerate those groups recursively so you can determine exactly who is an administrator in your domain. BuiltInGroupsEnum.vbs v 1.2 (updated 10/1/2009) fixes an issue with enumeration of other domains, and adds Enterprise and Schema Admins to list of…