zing revised this gist . Go to revision
1 file changed, 15 insertions
gistfile1.txt(file created)
@@ -0,0 +1,15 @@ | |||
1 | + | # Create the user "Hareash S" in the AD_PowerShell OU | |
2 | + | New-ADUser -Name "Hareash S" ` | |
3 | + | -GivenName "Hareash" ` | |
4 | + | -Surname "S" ` | |
5 | + | -SamAccountName "HS" ` | |
6 | + | -UserPrincipalName "Hareash@Xceed.com" ` | |
7 | + | -AccountPassword (ConvertTo-SecureString "Welcome123$" -AsPlainText -Force) ` | |
8 | + | -Path "OU=AD_PowerShell,DC=Xceed,DC=com" ` | |
9 | + | -Enabled $true ` | |
10 | + | -OtherAttributes @{ | |
11 | + | title = "Admin"; | |
12 | + | department = "ITIS"; | |
13 | + | company = "TCS"; | |
14 | + | manager = "CN=Hari,OU=AD_PowerShell,DC=Xceed,DC=com" | |
15 | + | } |
Newer
Older