Filter or LDAP filter

Richard Siddaway's Blog

Many of the Microsoft AD cmdlets have a –Filter and an –LDAPFilter parameter. So what’s the difference?

PS> Get-Help Get-ADUser -Parameter *Filter*

-Filter <String>
Specifies a query string that retrieves Active Directory objects. This string uses the PowerShell Expression
Language syntax. The PowerShell Expression Language syntax provides rich type-conversion support for value types received by the Filter parameter. The syntax uses an in-order representation, which means that the operator is placed between the operand and the value. For more information about the Filter parameter, see about_ActiveDirectory_Filter.

-LDAPFilter <String>
Specifies an LDAP query string that is used to filter Active Directory objects. You can use this parameter to run your existing LDAP queries. The Filter parameter syntax supports the same functionality as the LDAP syntax. For more information, see the Filter parameter description and the about_ActiveDirectory_Filter.

This means you have two ways to approach a problem. Lets think about finding a…

View original post 171 more words