tags:

views:

335

answers:

2

I am trying to import users into AD using a CSV file, PowerShell, and Quest's AD CmdLets. When the users are added the UserPrincipleName is not added.

Here is a sample CSV:


FirstName,LastName,DisplayName,SamAccount,UserPrincipleName,Email

FirstA,LastA,"First Last",FLastAL.ou1,[email protected],[email protected] First2A,Last2A,"First2 Last",FLast2AL.ou1,[email protected],[email protected]


Here is the PowerShell snippit:

$Users = Import-Csv $UserFile
foreach ($User in $Users)
{
    New-QADUser -FirstName $User.FirstName -LastName $User.LastName -DisplayName $User.DisplayName -SamAccountName $User.SamAccount -Name $User.SamAccount -UserPrincipalName $User.UserPrincipalName -ParentContainer "OU=$OUName,OU=Customers,DC=clients,DC=domain,DC=local"
}

Also, is this maybe a better question for ServerFault now that it is live? I feel it is definitely in a gray area.

A: 

FWIW, I checked with the latest QAD release (v1.2) and it works.

Shay Levy
A: 

I think the problem was the fact that we are using Exchange 2007 which does not use RUS. When I used the Exchange 2007 CmdLets to do the same thing everything is working correctly.

Matt Spradley