#144030 - 2005-07-21 12:58 PM
Populating CSV Columns
|
otf
Getting the hang of it
Registered: 2003-11-21
Posts: 53
Loc: Scotland
|
hi,
I want my output of AD users to populate specified columns in a CSV instead of listing all output under the 1st column.
my code:
BREAK ON $domain = GetObject("LDAP://ou=blah,dc=blah,dc=blah,dc=blah") ;Connect to AD IF NOT $domain = 0 ;Confirm connection $nul=RedirectOutput("c:\export.csv",0) ;Output to CSV "Department,Name,Surname,First Name,Email Address, Description" ;6 Columns set in CSV For Each $user in $domain ? $user.department ? $user.givenname ? $user.sn ? $user.name ? $user.mail ? $user.description ;end of script
I've tried a few things but nothing to give me the result i require. I know there must be a simple way of doing this but i'm starting to go round in circles here  thanks
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1636 anonymous users online.
|
|
|