Jump to content

Editing user account properties using command line


Recommended Posts

Does anyone know a tool or method for changing the properties of an user account within Windows 2000 or 2003 server from the command line? I'm asking this because I'd like to automate this task.

I'd like to change the following properties from the command line:

  • Connect client drives at logon: disable
  • Connect client printers at logon: disable
  • Default to main client printer: disable
  • Enable remote control: disable
  • Remote Access Permissions: deny access

Link to comment
Share on other sites


Well, if your user accounts are on a domain you can use Group Policies to do this. If these are local accounts you may have a tougher time.

What I do in cases like this is:

1. Create a new user account called "template" with admin rights.

2. Logon as that user.

3. Run RegShot and take a initial snapshot of the registry.

4. Run gpedit.msc and set the user group policies as I want.

5. Close gpedit.msc

6. Take a final regshot and do a compare.

7. Using regedit, investigate the change changed registry keys and save them to reg files.

8. Edit the crap out of the reg files so they only have the changes I need.

Now you have a registry file that will load the policies you want. You just need to apply it to the default user profile. The best way to do this is during the cmdlines.txt portion of windows setup.

Link to comment
Share on other sites

First off, these settings look to be Terminal Server related.

I would suggest you check the Microsoft Technet Scripting site, specifically the Script Repository, there are a number of Terminal Server and User configuration scripts located there.

Good luck.

tguy

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
  • Recently Browsing   0 members

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