2 Replies Latest reply on Apr 12, 2017 3:12 AM by LucaMeglioli

    vrealize automation / orchestraotr workflow to clone an AD user

    LucaMeglioli Novice

      Hi ,

       

      it is possibile to create a workflow that request for 2 input parameter (first and last name)

      and recall a powershell script to clone a AD user setting this 2 (and other) parameter?

       

       

      for example :

       

      name Marco

      last name: rossi

       

      clone user "generico" setting name to "Marco" , last name to " rossi"

      email to "m.rossi@email.com"

      set a default password (and mark "change password at net logon")

       

      thank you

       

      Luca

        • 1. Re: vrealize automation / orchestraotr workflow to clone an AD user
          lnairn Expert
          VMware Employees

          Hi,

          I think you can use the AD plugin for this.

          You can query for the different attributes the template user has, and set the attributes to the new user.

          So, you can create a workflow that:

          • Create a new user with the account name, mail, default password and mark the change password option (you can use Create a User with a password in a group)
          • Read the "template user" attribute values, and set the values using something similar to:

           

          var atts = templateuser.allAttributes;

          for each (var att in atts)

          {

          switch (att.name)

          {

          case "atributename1":

          NewUser.setAttribute(att.name , templateuser.getAttribute(att.name))

          break;

          case "atributename2":

          NewUser.setAttribute(att.name , templateuser.getAttribute(att.name))

          break;

          }}

           

          Regards,

           

          Leandro.

          • 2. Re: vrealize automation / orchestraotr workflow to clone an AD user
            LucaMeglioli Novice

            Hi ,

             

            thank you for your reply ,

             

            so it is possibile to give to the PS script the user created in the 1st step of the workflow?

             

            the the PS script i just need to substitute "templateuser" with my template name?