Paul wrote:
> I got the below to work ok, ( I can also export the entire OU)
>
> csvde -f C:\Get-Group\GroupMembers.csv -r
> "memberOf=cn=H050,ou=mygp,dc=mydom,dc=co,dc=uk " -l
> "sAMAccountName,givenName,physicalDeliveryOfficeNa me,memberOf"
> -SERVER.DOM.co.uk
>
> But i need to export all members of just 4 groups (from the same OU) Not
> just H050 ie i need to include H051 H052 H053 also..
>
> Any options \ideas.
>
The syntax for the filter would be (watch line wrapping):
-r
"(|(memberOf=cn=H050,ou=mygp,dc=mydom,dc=co,dc=uk) (memberOf=cn=H051,ou=mygp,dc=mydom,dc=co,dc=uk)(me mberOf=cn=H052,ou=mygp,dc=mydom,dc=co,dc=uk)(membe rOf=cn=H053,ou=mygp,dc=mydom,dc=co,dc=uk))"
Wildcards are not allowed and you must specify the full distinguished names.
The "|" (pipe symbol) is the "OR" operator.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab -
http://www.rlmueller.net
--