Avatar of stlhost
stlhost
Flag for United States of America asked on

Remove Local Admin, Delete an Account, Add User

Looking for a way to remove 1 local account. Add an account with a password, set it to never expire and add it to the local admin group.

WMIC USERACCOUNT WHERE "Name='ctcpoweruser'" SET PasswordExpires=FALSE /EXPIRES:NEVER /PASSWORDCHG:NO /ADD

The account I need to remove is ctc and I need to add ctcpoweruser to the local admin group. If this can't be done with WMIC using some other command would be fine. I will be passing this all through a bat file that will psexec it out to all workstations
Windows 7

Avatar of undefined
Last Comment
Dennis Johnson

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dennis Johnson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck