This topic contains 1 reply, has 2 voices, and was last updated by
September 18, 2019 at 2:47 am #177936ParticipantTopics: 1Replies: 0Points: 12Rank: Member
How would I go about creating a script to create new machine names in Active Directory? Now I have been reading online where scripts written would pull a list of computer names from a .CSV file but I actually want to try a different approach. We are setting up a new Citrix environment that will have identical Citrix Sites in two different data centers – Site A and Site B. I am trying to figure out how to construct a script that requires parameters to be entered and is a single script that will be used to create machines in Site A and/or Site B. Then, using the Citrix SDK, will have another script to create a new Machine catalog that will create new VDA MCS linked clones and target the machines created from the script in question in this post. (That's the dream anyway.)
The computer names would have a naming convention of the following:
So it would be WIN
The script would ask for the Environment Name, AppNAme, , how many instances, the Active Directory OU location and then which Site. Then it would just use the "New-ADComputer" cmdlt to create the new machine objects in Active Directory at the given Organizational Unit path.
I am trying to avoid requiring a text file to store the computer names so this script can be kept in Team Foundation Server.
September 18, 2019 at 2:54 am #177960Senior ModeratorTopics: 8Replies: 1085Points: 3,651Rank: Community Hero
You can create a script with all the above mentioned inputs as parameters. It will not be difficult for you to start. If you have not written a PowerShell script before, I highly recommend getting started with it. below videos will easily help you in doing this. If you already have something wrote, please share it here (keeping samples for all confidential stuffs) to give us a better picture on where you are.
You must be logged in to reply to this topic.