Link to home
Start Free TrialLog in
Avatar of MilesLogan
MilesLoganFlag for United States of America

asked on

Verify if Account is in a certain AD group


I use the search below to get me certain accounts within my environment , can someone help me modify it so it can also verify
if these "x" accounts are also members of the  " X Users Group"  ? so the xData file can also show if each of these accounts are members
of the X Users Group ?

Get-ADUser -Filter {SamAccountName -like "*X"} -properties * | ? { $_.whenCreated -ge (get-date "December 1, 2014") -and ($_.samaccountname.length -eq 10) } | Select SamAccountName,description,Title | Export-csv "xData_$(Get-date -f dd-MM-yyy-hhmmss).csv" -NTI
Avatar of Phil Bossman
Phil Bossman
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MilesLogan


Hi Phil , this worked perfect .. thank you so much !