Difference between revisions of "Add user to workstation group"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m (Reverted edits by KevinMurphy (talk) to last revision by Csjjpm)
m
 
Line 4: Line 4:
 
'''''System error 1789 has occurred. The trust relationship between this workstation and the primary domain failed.'''''
 
'''''System error 1789 has occurred. The trust relationship between this workstation and the primary domain failed.'''''
  
 +
<source lang="xml">
 
  <package id="RDP-JoePublic"
 
  <package id="RDP-JoePublic"
 
         name="Add Joe Public to local machine for RDP"
 
         name="Add Joe Public to local machine for RDP"
Line 13: Line 14:
 
         <remove cmd='%comspec% /c net localgroup "Remote Desktop Users" domain\userjp  /delete'> <exit code='2'/></remove>
 
         <remove cmd='%comspec% /c net localgroup "Remote Desktop Users" domain\userjp  /delete'> <exit code='2'/></remove>
 
  </package>
 
  </package>
 +
</source>
 +
 +
[[Category:Changing Windows settings]]

Latest revision as of 04:47, 27 March 2013

Here is how to add a local or domain user to a local workstation group such as "Remote Desktop Users"

My example package is for adding an active directory or domain user but you can add a local workstation user by not prefixing the "domain\". However, in order to add a domain user the system must be attached to the network at the time of WPKG running otherwise you will get the following error: System error 1789 has occurred. The trust relationship between this workstation and the primary domain failed.

 <package id="RDP-JoePublic"
        name="Add Joe Public to local machine for RDP"
        revision="%version%"
        reboot="false"
        priority="1">
        <variable name="version" value="1"/>
        <install cmd='%comspec% /c net localgroup "Remote Desktop Users" domain\userjp  /add'/>
        <remove cmd='%comspec% /c net localgroup "Remote Desktop Users" domain\userjp  /delete'> <exit code='2'/></remove>
 </package>