We help IT Professionals succeed at work.

how to pull a user first name and last name from LDAP using Powershell?

893 Views
Last Modified: 2012-03-05
experts,

What is the command to grab the user's first name and last name from ldap?

I needed to find the users' email and found this code that pulled out the email address. I attached the fiile. How would I pull out just the user's last name from this powershell script?

thanks, Missymadi2
Comment
Watch Question

Professional Services Engineer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Kamalasekar ParthasarathyMessaging Support

Commented:
Get-User -Identity * | FT FirstName, Lastname
Dale HarrisProfessional Services Engineer
CERTIFIED EXPERT

Commented:
Sekar, I don't think you can use "Get-User".  I think it has to be "Get-QADUser" or "Get-ADUser" if you're using the snapin from Microsoft.
Kamalasekar ParthasarathyMessaging Support

Commented:
DaleHarris:

If we have exchange Management shell, then we can use the Get-User command to get the details of the users
Dale HarrisProfessional Services Engineer
CERTIFIED EXPERT

Commented:
Oh, my mistake Sekar.  I sit corrected.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.