Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How can I use the Get_ADgroup cmdlet to filter on specific groups?

$
0
0

I'm trying to extract the users from specific groups

Get-AdGroup -Filter {('Name -like "MyCo *Admin*"') -or (Name -like MyCo Helpdesk"')}

This works: Get-ADGroup -Filter 'Name -like "MyCo *Admin*"'

I  have an number of administrator groups and one with the name helpdesk, I'm trying to create a list of all the users in any  groups that have admin privledges.

I can run the command twice and export to csv and merge both lists, but would like to create a script that I can use regualrly and have one csv file when done.

Any suggestions would be appreciated

-Tom





Tom


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>