CSVDE LDAP help!

Soldato
Joined
4 Dec 2003
Posts
2,847
Trying to write a simple ldap query but whenever I parse some field parameters I get nothing back :(

What I need is the home folder and drive it is mapped too, logon script, userlogon name and primary email but whenver I add -l homefolder for example I get no results back.

This needs to be done for a particular group in AD - any ideas? :)

Thanks!
 
Any reason this has to be done using csvde and not powershell?

Something like the following should do the trick;

Code:
$group = read-host
$csvFile = "$ENV:USERPROFILE\Desktop\" + $group + ".csv"
get-adgroupmember $group | get-adobject -properties * | `
select-object -property homedirectory,homedrive,scriptpath,samaccountname,mail | `
export-csv $csvfile -NoTypeInformation

You can run that from the powershell ise or as a script (.ps1). and it'll prompt for a group name and save the CSV to your desktop.

you'll need the active directory powershell module loaded (http://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx). It is possible to to this without the AD module but it would require a few more lines of code.
 
Back
Top Bottom