header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Exporting multivalued attributes to csv
Last Post 09 Jan 2012 01:17 PM by kraigk. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rattyUser is Offline
New Member
New Member
Posts:21
Avatar

--
23 Jun 2010 06:54 PM
    Hey guys,

    I have a script that searches Exchange for a list of mailboxes, then uses mailboxdisplayname in GET-QADUSER where I include publicdelegates and publicdelegatesbl attribs.

    I now want to export the user, the users who are delegates and, those who the user is a delegate of to csv.

    Any ideas ?

    Exchange 2003
    AD 2003
    Powershell v1.0
    Quest AD cmdlets


    Thanks in advance.
    rattyUser is Offline
    New Member
    New Member
    Posts:21
    Avatar

    --
    28 Jun 2010 08:12 PM
    OK - must be a tough question - no replies :(
    Bartek BielawskiUser is Offline
    New Member
    New Member
    Posts:43
    Avatar

    --
    28 Jun 2010 09:32 PM
    Well...
    1. This is AD not Exchange forum, so folks who play with exchange may simply ignore this sub-forum. ;)
    2. You are not very specific about outcome you expect. I can see two possible:
    Repeat other values and add multivalued to each clone:
    Param1,Param2,Param3,Param4-Value1
    Param1,Param2,Param3,Param4-Value2
    ....
    Put multi-valued in one 'cell', but formated in a proper (for use case) format
    Param1,Param2,Param3,Param4-Value1;Param4-Valu2;...
    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    28 Jun 2010 11:49 PM
    Try this

    $users = Get-QADUser -SizeLimit 0 -IncludedProperties publicdelegates,publicdelegatesbl -LdapFilter '(publicdelegates=*)(publicdelegatesbl=*)'

    $users | select * | foreach {
    $publicdelegates = $_.publicdelegates | get-qaduser | foreach {$_.name}
    $_.publicdelegates = [string]::join(';',$publicdelegates)

    $publicdelegatesbl = $_.publicdelegatesbl | get-qaduser | foreach {$_.name}
    $_.publicdelegatesbl = [string]::join(';',$publicdelegatesbl)

    $_
    } | Select-Object Name,DN,publicdelegates,publicdelegatesbl

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    kraigkUser is Offline
    New Member
    New Member
    Posts:11
    Avatar

    --
    09 Jan 2012 01:17 PM
    Shay - I have your code above working but am trying to get email addresses associated with publicdelegates and publicdelegatesbl attribs as well as trying to get it all out into a .csv file. Can you help me?

    We have over a 1000 users with publicdelegates set and as you might expect we see a fair amount of help desk tickets related to delegate issues.
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer