Last active
August 7, 2018 22:29
-
-
Save techbunny/c87cbc6d9ac54a4b8ddd9c2178b9b28a to your computer and use it in GitHub Desktop.
User Creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Adds KDS Root Key with no delay. Use only with testing, will cause issue with more than one DC. | |
Add-KdsRootKey -EffectiveTime ((get-date).addhours(-10)) | |
#Create a OU for Worker VMs and AD Group for Container Hosts | |
New-ADOrganizationalUnit "WorkerVMs" | |
New-ADGroup -GroupCategory Security -DisplayName "Container Hosts" -Name containerhosts -GroupScope Universal | |
$containerhosts = Get-ADGroup containerhosts | |
# Create some sample regular users if needed for future testing | |
New-ADUser -Name User1 -PasswordNeverExpires $true -AccountPassword ("Password123!" | ConvertTo-SecureString -AsPlainText -Force) -Enabled $true -UserPrincipalName User1@win.local | |
$user1 = Get-ADUser User1 | |
New-ADUser -Name User2 -PasswordNeverExpires $true -AccountPassword ("Password123!" | ConvertTo-SecureString -AsPlainText -Force) -Enabled $true -UserPrincipalName User2@win.local | |
$user2 = Get-ADUser User2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment