Creating local users for a group of computers using GPO

Posted on 2011-05-04
Last Modified: 2012-06-27

I have windows 2008 DC and I have around 100 clients connected to DC. In that I want to create a local user called 'serviceaccount' in 50 systems and they are under one OU called "roaming"

I tried to do the same using

But it did not worked..It is not showing the accounts in local systems. I tried with windowx XP SP2 client

what might be the cause.

Question by:vneedhelp
    LVL 82

    Expert Comment

    That's because this is a group policy preference which has been introduced long after XP has been released. Having a W2k8 DC is not enough, you need to install the Group Policy Preference Client Side Extensions to be able to use them on XP.
    Information about new Group Policy preferences in Windows Server 2008
    LVL 41

    Expert Comment

    You should also upgrade those systems to SP3 anyway so you can get the security updates since July 13, 2010. You can't get any new XP related updates until you go to SP3.
    LVL 22

    Expert Comment

    You should be able to do this as is with restricted Groups policy

    see here for more information

    LVL 82

    Expert Comment

    Another way to do that without having to install the GPPCSE would be a computer startup script, for example as batch:
    @echo off
    net user "Serviceaccount" "NotSoSecretPassword" /add

    Open in new window

    But that's a security risk, and it's something that you have to know is happening in this script, unlike the Preferences where you can directly see what's going on.

    Restricted Groups policies can't create users, neither local nor in the domain; they only control membership in/of existing groups and existing users.

    Author Comment

    I updated to XP SP3 and also tried in windows 7, but in both are not working..

    I did the same step what is mentioned in the above article
    LVL 66

    Expert Comment

    Not sure why obda's suggestion didnt work. Should be a very simple way to do it....
    LVL 22

    Expert Comment


    you might try this to see if there is any error message
    net user "Serviceaccount" "NotSoSecretPassword" /add > c:\output.txt

    then check c:\output.txt for any message
    LVL 22

    Accepted Solution


    If you don't mind using Kix for a script then here is a page with several useful functions.

    For your startup script you need something like this (I just put into a .bat file)

    \\server\share\kix32.exe \\server\share\adduser.kix        --see code attached and put into a text file adduser.kix

    On the is page (source of function) there is another to add the user to local admin group

    Lastly, you can 'scramble' the adduser.kix file to that is it unreadable.

    kix32 adduser.kix /t         that will output a file name adduser.kx

    to run it:   \\server\share\kix32.exe  \\server\share\adduser.kx

    CreateLocalUser(Username, Password, "some description")
    Function CreateLocalUser($strName, $strPassword, $Description)
    	;DESCRIPTION : Attempts to create a local user account
    	Dim $strComputer, $objComputer, $objUser  
    	;Set Variables
    	$strComputer = @WKSTA
    	;Create Object
    	$objComputer = GetObject("WinNT://" + $strComputer)
    	;Create object of class user on the computer.  
    	$objUser = $objComputer.Create("user", $strName)  
    	$objUser.Put("description", $Description)
    	;Save changes.  
    	;set password.  

    Open in new window

    LVL 22

    Expert Comment

    by:chakko for download and information

    Featured Post

    Do email signature updates give you a headache?

    Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

    Join & Write a Comment

    Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
    It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
    This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now