active directory - Listing users of all groups in a particular OU -
so trying list groups , users of groups in ou. can list groups under ou. i'm not sure how list users in groups well. ideas?
i outputting csv.
here have:
import-module activedirectory $aduserparams=@{ 'server' = 'myplace.local' 'searchbase' = 'ou=my user groups, dc=myplace, dc=local' 'searchscope'= 'onelevel' # possible values: base, onelevel, subtree 'filter' = '*' 'properties' = '*' } $selectparams=@{ 'property' = 'name','displayname', 'description', 'emailaddress' } get-adgroup @aduserparams | select-object @selectparams | export-csv "c:\temp\mylist.csv"
Comments
Post a Comment