Replace “GroupName” with the name of the group you want to list the users for. Replace “OU1” and “OU2” with the names of the OUs
Get-ADGroupMember -Identity "GroupName" | Get-ADUser -Properties * | Where-Object {($_.DistinguishedName -like "*OU=OU1,DC=domain,DC=com*" -or $_.DistinguishedName -like "*OU=OU2,DC=domain,DC=com*") -and $_.Enabled -eq $true} | Select-Object Name,SamAccountName