Jump to content

Script that provide local admin rights to PC


cad29
 Share

Recommended Posts

If you are using XP you can Google "MakeMeAdmin.cmd", which is a command line batch file which you can use to use to open an Administrator enabled command prompt. This relies that you know the username and password of an Admin account on the local machine. If you are trying to somehow go around the security and hack into an Admin account, there are several paid apps which can do that, but nothing here.

Link to comment
Share on other sites

Thanks for the reply guys.Im admin and I usually provide admin rights to the user manually by going to lusrmgr.msc and then add their username in the administrator group but I want to do this one automatic if it is possible thanks.

Link to comment
Share on other sites

Thanks for the reply guys.Im admin and I usually provide admin rights to the user manually by going to lusrmgr.msc and then add their username in the administrator group but I want to do this one automatic if it is possible thanks.

Change the variables to the appropriate values
Local $AdminAccount = 'YourAdmintratorAccount'
Local $Domain = 'YourDomain'
Local $Password = 'YourPassword'
Local $UserToAdd = 'Domain\Username'

RunAs($AdminAccount, $Domain, $Password, 2, 'net LocalGroup Administrators /add "' & $UserToAdd & '"', '', @SW_HIDE)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...