Well, it depends on the error you got of course – please always include errors – but I don’t think you can specifically do what you’re looking for in a single command.
I don’t think AD actually tracks what groups a user belongs to as an attribute of the user object, so there’s no way Get-ADUser can filter on that. Group membership is tracked as part of the Group object. So as far as I know, you’d have to get all the users, and then get the members of the group, and then filter (in PowerShell, using Where perhaps) out the ones you don’t want. In other words, I don’t think the domain controller will do all that for you in a single operation.