New-QADUser Cmd在PowerShell中调用时,不添加UserPrincipalName
我正尝试使用CSV文件,PowerShell和Quest的AD CmdLets将用户导入到AD中。 添加用户时,不会添加UserPrincipleName。 这里是一个CSV示例: 名字,姓氏,显示名称,SamAccount,UserPrincipleName,电子邮件 FirstA,LastA,“First Last”,FLastAL.ou1,FLastAL.ou1 @ clients.domain.local,FLastA @ outemail.com First2A,Last2A,“First2 Last”,FLast2AL.ou1,FLast2AL.ou1 @ clients.domain.local ,FLast2A @ outemail.com 这里是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" }