![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| vista | create Ad user on local machine Hey, i would liek a script to create user on local. my script : Quote: $domaineSMTP = "@$env:USERDNSDOMAIN" $domaineLDAP = "$env:USERDNSDOMAIN" $domaineLDAP = $domaineLDAP.Replace('.',',DC=') $domaineLDAP = "DC=$domaineLDAP" $OU = 'OU=Utilisateurs' $usersOU = [ADSI]"LDAP://$OU,$domaineLDAP" $newUser = $usersOU.Create("user","cn=MyNewUser") $newUser.SetInfo() Quote: Exception retrieving member "Create": "There is no such object on the server. " à : ligne:7 caractère:11 + $newUser = <<<< $usersOU.Create("user","cn=MyNewUser") plz help me |
My System Specs![]() |
| | #2 (permalink) |
| | Re: create Ad user on local machine If you have Quest CmdLets installed why not use "New-QADUser"? e.g. New-QADUser "MyNewUser" -ParentContainer "Utilisateurs" HTH Chris |
My System Specs![]() |
| | #3 (permalink) |
| vista | Re: create Ad user on local machine Quote: f you have Quest CmdLets installed why not use "New-QADUser"? e.g. New-QADUser "MyNewUser" -ParentContainer "Utilisateurs" HTH Chris Quote: Cannot resolve DN for the given identity: 'Utilisateurs' à : ligne:1 caractère:12 + New-QADUser <<<< "MyNewUser" -ParentContainer "Utilisateurs" |
My System Specs![]() |
| | #4 (permalink) |
| | Re: create Ad user on local machine Given your previous usage I had assumes Utilisateurs existed as an OU in the root of your AD domain. You'll need to confirm the path to that, parentContainer can be passed either like this: yourdomain.com/OU1/OU2 Or like this: ou=OU2,ou=OU1,dc=yourdomain,dc=com But the parentContainer must exist. Chris epiouf wrote: Quote: Quote: >> f you have Quest CmdLets installed why not use "New-QADUser"? >> >> e.g. >> >> New-QADUser "MyNewUser" -ParentContainer "Utilisateurs" >> >> HTH >> >> Chris > when i try this i have error message to : > Quote: >> Cannot resolve DN for the given identity: 'Utilisateurs' >> à : ligne:1 caractère:12 >> + New-QADUser <<<< "MyNewUser" -ParentContainer "Utilisateurs" > |
My System Specs![]() |
| | #5 (permalink) |
| vista | Re: create Ad user on local machine now i connect to my computer like this : Quote: LOCALDEV\dev $OU = 'OU=Utilisateurs' $usersOU = "$domaineLDAP,$OU" new-QADUser -ParentContainer $usersOU -name 'adduser1' -sAMAccountName 'gadduser1' error message : Quote: Cannot resolve DN for the given identity: 'LOCALDEV,OU=Utilisateurs' |
My System Specs![]() |
| | #6 (permalink) |
| | Re: create Ad user on local machine The path you're supplying is not valid. If you see this in AD Users and Computers: yourdomain.com | - FirstOU | - SecondOU Then the distinguished name would be: OU=SecondOU,OU=FirstOU,DC=yourdomain,DC=com You can also express that in the canonical name format: yourdomain.com/FirstOU/SecondOU Note that with the second format the "OU=" prefixes are not necessary. If the container / OU you're using is the default Users container then the distinguished name becomes: CN=Users,DC=yourdomain,DC=com Chris epiouf wrote: Quote: > now i connect to my computer like this : Quote: >> LOCALDEV\dev > $domaineLDAP = "LOCALDEV" > $OU = 'OU=Utilisateurs' > $usersOU = "$domaineLDAP,$OU" > > new-QADUser -ParentContainer $usersOU -name 'adduser1' -sAMAccountName > 'gadduser1' > > error message : > Quote: >> Cannot resolve DN for the given identity: 'LOCALDEV,OU=Utilisateurs' > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Create local user from sysprep | VB Script | |||
| login to local machine | Vista account administration | |||
| How to get the Local Machine Name | VB Script | |||
| Add local machine users to local admin group via GPO | .NET General | |||
| cannot copy files onto local machine | Vista installation & setup | |||