Scripting up an Active-Directory Test Environment through PowerShell
The first step in building up a Test Environment is analyzing the data that we have to work with. In this case, the Star Trek Reference Csv file.
Since the Csv file doesn’t say sAMAccountName or organizationalUnit I’ve to set up a routine for handling this. Based on the information, I’ve set up the following rules:User Information
- Common Name = Character Name
- sAMAccountName = First 3 Characters from givenName and surName
- userPrincipalName = sAMAccountName and Domain
- DisplayName = Character Name
- givenName = First part of Character Name
- surName = Last part of Character Name
- Description = Postition + Species
- l = Starship
- streetAddress = Location
- physicalDeliveryOfficeName = Starship
- Title = Rank
- Department = Department
- Company = Starship
- mail = CharacterName and Domain
Computer Information
- Common Name = Starship
- sAMAccountName = Registry
- Location = Location
- Description = Starship
Group Information
- Common Name = Position
- Description = Position
- sAMAccountName = Position
Group MemberShip
- Members = Based on Users Position
Organizational Unit Structure
- ou = Series
- l = Location
- Description = Starship
- Child OU: Computers
- Child OU: Groups
- Child OU: Users
Users HomeFolder
- HomeFolder = Based on Users sAMAccountName and a defined Path
[?]
