Link to home
Start Free TrialLog in
Avatar of P S
P S

asked on

Script is not working

There are multiple groups with naming convention as XXXX_GPOAXXXX and XXXX_OUAXXXX and I am trying to search all of them using below script.

Can anyone tell me what is wrong and why it is not working?

Get-ADGroup -filter * | Where-Object {($_.name -match "_gpoadm*") -and ($_.name -match "_OUad*")} | select name

Thanks!!
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of P S
P S

ASKER

Thanks David and oBdA. It will help me a lot and yes i am just starting with Powershell so you guys can expect a lot more coming from me.

Thanks again guys!!. Really appreciate the help.