Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

New-QADUser : Cannot Resolve directory object for the given identity - on the child domain

$
0
0

I'm trying to add users but the child.domain.com directory is not resolving. I cannot make it find the ou=,ou=,dc=,dc=,dc=

On the domain it finds ou=,ou=,dc=,dc=  just fine.

I don't know what I need to find the container on the child domain?

 

Here is my script:

Import-Csv "CreateADUsersAll2001.csv" | ForEach-Object {
    $userPrinc = $_."sAMAccountName" + "@show.tape"
    New-QADUser -Name $_.displayname `
        -ParentContainer $_."Container" `
        -SamAccountName $_."sAMAccountname" `
        -UserPassword "Cortado01!" `
        -FirstName $_."givenname" `
        -LastName $_."surname" `
        -UserPrincipalName $userPrinc `
        -DisplayName $_."displayName" ;`
    Add-QADGroupMember -identity $_."GroupMember" -Member $_."sAMAccountName" ;`
    Set-QADUser -identity $_."sAMAccountName" `
        -UserMustChangePassword $False `
}

Here is my .csv info

givenname,surname,sAMAccountName,displayname,userPrincipalName,Container,emailaddress,Groupmember
Judy,Rakestraw,JudyRakestraw,Judy Rakestraw,JudyRakestraw@show.tape,Ild.show.tape/AllC/All2001,JudyRakestraw@show.tape,Cornado

This "Ild.show.tape/AllC/All2001" container is not being found. Everything looks ok on the child domain as far as setup. Is there a different command structure for a child domain?


Viewing all articles
Browse latest Browse all 6937

Trending Articles