Home > Windows Server Tips > > Run admin tools from a desktop
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Run admin tools from a desktop


MARK MILLS
08.03.2006
Rating: -3.75- (out of 5) Hall of fame tip of the month winner


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Every administrator knows that it is bad etiquette to add their own username to the domain admin group. However, it can be tempting to do so in order to run common administrative tasks from your PC. With the following batch file, you will be prompted for the domain admin password, but you will act as a standard user while running administrative tools at your desktop.

Start the process with these first two steps:

  1. Install the adminpak.msi file off your server CD onto your workstation PC.
  2. Get the 'choice.exe' file off the Win2k resource kit and put in the same directory as the script below. It will work in a Win2k3 or Win2k domain.

In the following script, replace [domain] with your domain name:

@echo off
@echo
:BEGIN
CLS
echo. 
echo. "What would you like to work on today master?" 
echo. 
echo. 
@echo off
echo 1 = "Users & Computers"
echo 2 = "AD SItes and Services"
echo 3 = "AD Domains and Trusts"
echo 4 = DNS
echo 5 = DHCP
echo 6 = "Group Policy"
echo 7 = Quit
CHOICE /N /C:1234567 PICK A NUMBER (1, 2, 3, 4, 5, 6, or 7)%1
REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT
IF ERRORLEVEL ==7 GOTO SEVEN
IF ERRORLEVEL ==6 GOTO SIX
IF ERRORLEVEL ==5 GOTO FIVE
IF ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE

:one runas /user:[domain]Administrator "mmc C:WINDOWSsystem32dsa.msc" GOTO END

:two runas /user:[domain]Administrator "mmc C:WINDOWSsystem32dssite.msc" GOTO END

:three runas /user:[domain]Administrator "mmc C:WINDOWSsystem32domain.msc" GOTO END

:four runas /user:[domain]Administrator "mmc C:WINDOWSsystem32dnsmgmt.msc" GOTO END

:five runas /user:[domain]Administrator "mmc C:WINDOWSsystem32dhcpmgmt.msc" GOTO END

:six runas /user:[domain]Administrator "mmc C:WINDOWSsystem32gpmc.msc" GOTO END

:seven GOTO END

:END exit

Please let us know how useful you find this tip by rating it below! If you have a useful Windows tip, timesaver or workaround to share, submit it to our tip contest and you could win a prize!

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts