Friday, March 30, 2007

Add User/Group to Localgroup with cusrmgr.exe

copy \\vls-sen-sdc01\netlogon\cusrmgr.exe C:\

C:

REM Add User Mayer Password:P@sSwoRd
net user Mayer P@sSwoRd /add

REM Add User Mayer to Localgroup Administrators
net localgroup administrators Mayer /add

REM Add Group "Domain\GroupName" to Localgroup Administrators
net localgroup administrators Domain\GroupName /add

REM Rename User Administrator to NewAdmin Password:NewPass
cusrmgr -u administrator -r NewAdmin -P NewPass

REM Set User Mayer's password to NewP@sSwoRd
cusrmgr -u Mayer -P NewP@sSwoRd

REM Add User Mayer to Localgroup Administrators
cusrmgr -u Mayer -alg administrators

del C:\cusrmgr.exe
net time \\vls-sen-sdc01 /set /y

Related Titles

 
visitors since March 26 2007
©2007