2

I want to use csvde to find 1 user based on SamAccountName and export all the details about that person to a CSV file.

The problem I am having is filtering by SamAccountName

csvde -f search.txt -p subtree -l SamAccountName,CN,Distinguedname -r (&(objectClass=User)(SamAccountName=jon.doe))

I get an error saying that it didn't know what SamAccountName is

I need it to run from command line ( no powershell or vbscript please )

4
  • Why no PowerShell? – Chris Dec 18 '14 at 15:07
  • im going to run the command from kix – software is fun Dec 18 '14 at 15:10
  • Is it an administrative script or a logon script? – Chris Dec 18 '14 at 15:12
  • will be running as a logon script – software is fun Dec 18 '14 at 15:15
3

If you have multiple filters, you have set filter in quotations marks

csvde -f search.txt -p subtree -l "sAMAccountName,cn,distinguedName" -r "(&(objectClass=User)(sAMAccountName=jon.doe))"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.