This was an interesting enough tool to spend an hour working on. SearchWinComputing has a quick run-through on some code (batch file) that will launch various Windows domain and exchange MMC consoles as another user. Basically you run the file, type 2, supply your domain admin password, and then the AD Users and Computers MMC should launch in domain admin context. Not bad. Although this is one click, one keystroke, and one window longer than my current method (right-click a shortcut), I certainly would need 8 such shortcuts to do what this batch file does in one. I like simplicity, so 1 > 8 in this case.
However, there is some errata in the instructions. I also had to scrounge choice.exe from a site called dynawell (Google for choice.exe), and I snagged sleep.exe from the Windows Server 2003 Resource Kit, although sleep is really not all that necessary if you just take that part of the code out. Hell, it’s been a long time since I delved into batch files, so maybe choice can be replaced with CASE for all I know.
Remove all the comments which are scattered in the code, typified by mixed case text. Change the paths to include the backslash such as c:\. Change the options to read :ONE instead of Option One:. Change the runas user to your domain admin or necessary admin to manage these tools. Correct the typo on option 3 “SItes.”
Now, I am not one to use fancy or even simple tools that are not usually always available. I’ve worked on enough systems and in enough ways to know that it sucks to become really accustomed to doing something one way (such as with shortcuts), and then be like a fish out of water when in a situation where I don’t have my nifty customized tools. Similar to how I rarely customize or “prettify” Windows anymore. I don’t need to spend 4 more hours after a reinstall making it pretty. So little tools like this are typically only minorly used by me. I like being able to sit down at nearly any Windows machine and knowing what I have available and what I would need to do to get what I want (resource kits, third party tools like procmon, etc). Either way, I think this little script can be useful for now.