P S
asked on
How to get displayname from manager attribute
Basically. i've a text file with bunch of samaccountnames and my task is to get firstname, lastname,email address and manager name out of those samaccountnames. I was able to write below script and 95% job is done but i can't seem to get manager name properly. Below is what i wrote
GC C:\temp\Test.txt| % {Get-Aduser $_ -Pr * | Select GivenName,Surname,displayn ame,manage r} | export-csv C:\temp\Test/csv
but I can't seem to get the display name of the manager. It's coming up similar to Distinguish name attribute.
Any help would be much appreciated
Thanks in advance..
GC C:\temp\Test.txt| % {Get-Aduser $_ -Pr * | Select GivenName,Surname,displayn
but I can't seem to get the display name of the manager. It's coming up similar to Distinguish name attribute.
Any help would be much appreciated
Thanks in advance..
ASKER
Thanks oBdA. It worked fine. You just made my day!!!.
one more thing though, how can i modify the same script to get the samaccountname, emailaddress attribute of managers.
Thanks again!!
one more thing though, how can i modify the same script to get the samaccountname, emailaddress attribute of managers.
Thanks again!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again. Beautiful Script!!!
Question answered.
A D,
please read the following article on how to close your questions properly, once you have your answer:
How do I accept a comment as my solution?
http://support.experts-exchange.com/customer/portal/articles/608621
A D,
please read the following article on how to close your questions properly, once you have your answer:
How do I accept a comment as my solution?
http://support.experts-exchange.com/customer/portal/articles/608621
Open in new window