Solved

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

Posted on 2013-05-24
3
1,990 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Hi all.   The other day I had to change the passwords for a bunch of users on the fly. Because they were so many, I decided to do it in an automated way and I would like to share it with you all.   If you are not doing it directly in a Domain Co…
How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now