Ldap – LDIFDE command returns “Invalid Parameter: Bad argument ‘-r'”

active-directoryldapwindows-server-2008-r2

I am running the following command in an attempt to export all of the groups from my domain.

ldifde -f export_Groups_NO_Members.ldf -s XXX -d "dc=XXX,dc=XXX,dc=XXX" -p subtree –r "(&(ObjectCategory=group)(objectclass=group)(name=*))" -l "cn,name,sAMAccountName,grouptype,objectclass" -j c:\

When I run this, I get the error Invalid Parameter: Bad argument '-r', but I am almost positive that the syntax on the LDAP filter is correct. Can someone see what is wrong here?

Best Answer

That '-r' is not a hyphen. It is an "em dash". Perhaps you copied and pasted that from Word/Outlook that auto-corrected your hyphen.