Solved

No User logon name populated under Account Tab in AD User Properties

Posted on 2013-05-24
3
2,115 Views
Last Modified: 2013-05-24
Hello,
I am working on a script that is creating a user in AD with certain attributes. It creates fine, tested login in with it but just wondering that the "User logon name" text box is blank along with drop down menu to choose the domain name.
Piece of the user creation code:
$sam = $_."Last Name".ToLower() + $_."First Name".substring(0,1).ToLower()
New-ADUser $sam -AccountPassword $setpass -OtherAttributes @{givenName=$_."First Name";sn=$_."Last Name"; displayName=$_."Last Name" + ", " + $_."First Name"; title=$_."Job Title"; employeeNumber=$_."Clock Number"}

Open in new window

Thanks for your help
0
Comment
Question by:namerg
  • 2
3 Comments
 

Author Comment

by:namerg
ID: 39195678
I think I got it, I had to add the userPrincipalName attrribute

New-ADUser $sam -AccountPassword $setpass -OtherAttributes @{userPrincipalName=$sam + $domain; givenName=$_."First Name";sn=$_."Last Name"; displayName=$_."Last Name" + ", " + $_."First Name"; title=$_."Job Title"; employeeNumber=$_."Clock Number"}

Open in new window

0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39195754
You are right.. UPN is not auto populated when you use New-ADUser or New-QADUser. You need to specify it while creating the user else it will be null.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39195805
Ahh.. that wasn't necessary.. You could have accepted your comment as answer.. I just added it for your information.. :-)
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question