-
-
Save gowatana/01b2c61527ee18a6497507ee62094eeb to your computer and use it in GitHub Desktop.
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
$ad_user_name_prefix = "demo-user-" | |
$ad_user_pass = "VMware1!" | |
$ou_path = "OU=demo-ou-01,DC=euc,DC=go-lab,DC=jp" | |
$ad_group_name = "demo-group-01" | |
1..10 | %{ | |
$ad_user_name = $ad_user_name_prefix + $_.ToString("000") | |
echo "User Name: $ad_user_name" | |
New-ADUser -Name $ad_user_name ` | |
-AccountPassword ($ad_user_pass | ConvertTo-SecureString -AsPlainText -Force) ` | |
-Path $ou_path -Enabled:$true | |
Add-ADGroupMember -Identity $ad_group_name -Members $ad_user_name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿向け
Horizon 検証むけの AD ユーザ作成の効率化。(PowerShell)
https://vm.gowatana.jp/entry/2022/07/02/225810