1 Reply Latest reply on Oct 28, 2011 4:05 AM by Gilles Portal

    Add domain user group to local admin group via unattend.xml

    davidg5700 Specialist



      I am trying to add a domain group to the local administrators group as part of the sysprep process.  I have inserted the code from the xml that I generated with WSIM into a working unattend.xml and it fails saying it could not parse line X at column Y.


      I have googled this and looked at the technet documentation and have found this to be very thin.  I have tried adding the requisite code to both the AuditSystem and oobeSystem pass and both fail.  I have tried this in both OSD and Provisioning and it both fails.  The code I am using is :


      <settings pass="oobeSystem">
              <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                          <DomainAccountList wcm:action="add">
                              <DomainAccount wcm:action="add">
                                  <Name>SN_IS Desktop Support</Name>


      I have tried inserting this in multiple places on the oobe pass: before the autologon section, after, etc.


      Might this be a problem with spaces in the group name?  I am at a loss for where to go from here.




      LD9 SP2  MCP  laying down Win7 SP1 Ent x64

        • 1. Re: Add domain user group to local admin group via unattend.xml
          Gilles Portal Apprentice


          I do it by executing a vbs script file :

          Here it is:


          Set wshShell = WScript.CreateObject( "WScript.Shell" )
          strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
          'WScript.Echo "Computer Name: " & strComputerName


          Set objAdmins = GetObject("WinNT://" & strComputerName & "/Administrateurs")
          Set objGroup = GetObject("WinNT://toto.fr/zzz.yyy.it.ad")
          Set objAdmins = GetObject("WinNT://" & strComputerName & "/Utilisateurs avec pouvoir")
          Set objGroup = GetObject("WinNT://toto.fr/domain users")


          Try it... It worked for Windows XP, but i don t tried it on Windows 7.