To get all members of an OU use this, substitute the name of OU containing 
users and your domain name. In the select part specify the properties you want 
to export. You can also use the –SearchScope to include any sub-OUs if you want.

Get-ADUser -SearchBase "ou=users,dc=ad,dc=local" -Filter * | select name | 
export-csv -Path c:\wherever\ou.csv -NoTypeInformation

From: [email protected] [mailto:[email protected]] On 
Behalf Of Kevin Ray
Sent: Thursday, 7 April 2016 6:37 AM
To: mssms <[email protected]>
Subject: [mssms] Script For AD User specifc OU group members to export in excel


Hi All,

lookin any kind of Script For User OU group members to export in excel

Kevin


________________________________


**********************************************************************
Information contained in this e-mail, including accompanying
documents, is intended for use of the addressee only. If
you are not the intended recipient, please notify the sender
as soon as possible and delete the e-mail. If you are not
the intended recipient, you may not distribute, copy, act
upon, retain or otherwise use this e-mail or information
contained here. The confidential and possibly privileged
nature of the information contained in this e-mail is not
waived by reason of mistaken delivery to other than the
intended recipient. Your use or reproduction of this e-mail
and accompanying documents may also breach South
East Water's copyright.
**********************************************************************
South East Water
ABN 89 066 902 547
101 Wells Street, Frankston
VIC 3199 Australia
Phone: (+61 3) 9552 3000 Fax: (+61 3) 9552 3001
Web: http://www.southeastwater.com.au

Reply via email to