Jump to content


  • 0
petebuk

Log on script to add local admin account

Question

5 answers to this question

Recommended Posts

  • 0

Hello all,

 

I am new to scripting an need to implement a script to run at log in to add a local administrator account cewadmin and set a password.

 

Any ideas?

 

you can implement a group policy (restricted groups) to add the account to administrators. In Brief:

1.Create Global Security group and add make "cewadmin" member of it.

2.create a new GPO by adding global security Group to it and make this group as member of Administrators.

  • Like 1

Share this post


Link to post
Share on other sites

  • 0

This is what I use, not sure if this is what you are looking for.

 

This should be used with Admin rights

 

@ECHO OFF
net user administrator /active:yes
net user administrator "enter your password"
echo.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.