Add local users via GPO

bsjj2727
bsjj2727 used Ask the Experts™
on
I'm trying to both add a local user account and reset the local admin account across my domain.  I understand that I can no longer do this via Group Policy Preference.  From what I'm reading most people are accomplishing this through powershell commands then dropping the commands into their logon script.  I'm pretty weak with powershell, can someone assist me with this please.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Manager - Infrastructure:  Information Technology
Commented:
You don't need powershell, you could use a batch file:

Adding Local User Account
---------------------------------------
net user username password /add
(i.e. net user jdoe P@ssw0rd /add)

Resetting Administrator password
---------------------------------------
net user username password
(i.e. net user jdoe P@ssW0rd)

Adding user to group
-------------------------------
net localgroup groupname username /add

Author

Commented:
Thank you that worked, but the only issue is the user logging in needs to be a local admin to the PC otherwise it won't work as they don't have permission to add users or reset admin accounts, is there a way around this?
Mohammed KhawajaManager - Infrastructure:  Information Technology

Commented:
What you could do is create the script, create a computer logon GPO and it will run the script at computer logon (i.e. computer power on).  Below is instructions on how to create a computer logon GPO:

https://technet.microsoft.com/en-us/library/cc779329(v=ws.10).aspx
http://kb.stonegroup.co.uk/index.php?View=entry&EntryID=320

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial