Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Changing from DN to just users actual name?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-14-2008   #1 (permalink)
TimParker
Guest


 

Changing from DN to just users actual name?

I have the following code that I am using to pull data for an XLS file
and when I pull the manager field I get a DN I would just like to get
the users Name (IE: Tim Parker). Is there an easy way to do that? I
have everything else working for this small project but that.

$users = get-qaduser -enabled | select department, lastname,
firstname, description, title, manager |
where {$_.department -ne $NULL} | Sort-Object lastname


TIA.

Tim

My System SpecsSystem Spec
Old 07-14-2008   #2 (permalink)
Brandon Shell [MVP]
Guest


 

Re: Changing from DN to just users actual name?

No

Only option you have is your own GUI that does the translation for you...
Perhaps something like powergui

Brandon Shell
---------------
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject

T> I have the following code that I am using to pull data for an XLS
T> file and when I pull the manager field I get a DN I would just like
T> to get the users Name (IE: Tim Parker). Is there an easy way to do
T> that? I have everything else working for this small project but that.
T>
T> $users = get-qaduser -enabled | select department, lastname,
T> firstname, description, title, manager |
T> where {$_.department -ne $NULL} | Sort-Object lastname
T> TIA.
T>
T> Tim
T>


My System SpecsSystem Spec
Old 07-14-2008   #3 (permalink)
Shay Levy [MVP]
Guest


 

Re: Changing from DN to just users actual name?



$manager =@{n="Manager";e={(Get-QADObject $_.manager).name}}
$users = get-qaduser -enabled | select department, lastname, firstname, description,
title, $manager | where {$_.department} | sort lastname


---
Shay Levy
Windows PowerShell MVP
blog: http://blogs.microsoft.co.il/blogs/ScriptFanatic



T> I have the following code that I am using to pull data for an XLS
T> file and when I pull the manager field I get a DN I would just like
T> to get the users Name (IE: Tim Parker). Is there an easy way to do
T> that? I have everything else working for this small project but that.
T>
T> $users = get-qaduser -enabled | select department, lastname,
T> firstname, description, title, manager |
T> where {$_.department -ne $NULL} | Sort-Object lastname
T> TIA.
T>
T> Tim
T>


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Changing from DN to just users actual name? Shay Levy [MVP] PowerShell 3 07-17-2008 07:40 AM
How can I keep users from changing the desktop icons and wallpaper the TEACHER Vista General 1 08-14-2007 04:36 PM
Problems with changing users Robyn Vista General 0 05-07-2007 03:56 PM
Changing the way users log on and off =?Utf-8?B?c21hbGx2aWxsZTE5NTY=?= Vista account administration 6 12-03-2006 06:38 PM
help with changing how users logon SilverHorse Vista account administration 2 07-03-2006 06:59 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51