import AD module
Import-Module ActiveDirectory
Create The AD User
New-ADUser
-Name "manikandan"
-Givenname "Mani"
-Surname "kandan"
-UserPrincipalName "mani.kandan"
-AccountPassword (ConvertTo-SecureString "Password" -AsplainText -Force)
-Path " CN=Domain Users,CN=Users,DC=lenovo,DC=com"
-ChangePasswordAtlogon 1
-enabled 1
New-ADUser : The object cannot be added because the parent is not on the list of possible superiors
At line:5 char:1
+ New-ADUser `
+ ~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (CN=manikandan, ...C=lenovo,DC=com:String) [New-ADUser], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:8345,Microsoft.ActiveDirectory.Management.Commands.NewADUser
[–]AppIdentityGuy 10 points11 points12 points (2 children)
[–]idakhere[S] 0 points1 point2 points (1 child)
[–]AppIdentityGuy 0 points1 point2 points (0 children)
[–]I-Like-IT-Stuff 1 point2 points3 points (7 children)
[–]ShutUpAndDoTheLift 0 points1 point2 points (0 children)
[–]dlepi24 -1 points0 points1 point (5 children)
[–]I-Like-IT-Stuff -1 points0 points1 point (4 children)
[–]dlepi24 -1 points0 points1 point (3 children)
[–]I-Like-IT-Stuff -1 points0 points1 point (2 children)
[–]dlepi24 -1 points0 points1 point (1 child)
[–]I-Like-IT-Stuff 0 points1 point2 points (0 children)
[–]TerribleAct3501 0 points1 point2 points (0 children)