4.2.10 Local Users and Groups Example

In the following example, the XML creates a local user called "DbAdmin" that is initially disabled. A local group called "Database Admins" is also created that removes all the members if they exist, and adds one member, "domain\sampleuser".

 <?xml version="1.0" encoding="utf-8"?>
 <Groups   clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}" 
           disabled="1">
   <User   clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}" 
           name="DbAdmin" 
           image="2" 
           changed="2007-07-06 20:45:20" 
           uid="{253F4D90-150A-4EFB-BCC8-6E894A9105F7}">
     <Properties 
           action="U" 
           newName="" 
           fullName="Database Admin" 
           description="Local Database Admin" 
           cpassword="demo" 
           changeLogon="0" 
           noChange="0" 
           neverExpires="0" 
           acctDisabled="1" 
           userName="DbAdmin"/>
   </User>
   <Group  clsid="{6D4A79E4-529C-4481-ABD0-F5BD7EA93BA7}" 
           name="Database Admins" 
           image="2" 
           changed="2007-07-06 20:46:21" 
           uid="{C5FB3901-508A-4A9E-9171-60D4FC2B404B}">
     <Properties 
           action="U" 
           newName="" 
           description="Local Database Admins" 
           userAction="REMOVE" 
           deleteAllUsers="1" 
           deleteAllGroups="1" 
           removeAccounts="0" 
           groupName="Database Admins">
       <Members>
         <Member 
           name="domain\sampleuser" 
           action="ADD" 
           sid=""/>
       </Members>
     </Properties>
   </Group>
 </Groups>