anim8rs
asked on
Filtering sAMAccountname by case in Powershell
So I have been beating my head against a wall trying to figure this one out.
I need to run a script that will return to me any sAMAccountname in AD that is in all uppercase. I believe that this is getting closer, but the operator is not supported...
get-aduser -Filter {sAMAccountname -cmatch'^[A-Z]+$'} -Properties name,samaccountname
Any input?
Thanks!
I need to run a script that will return to me any sAMAccountname in AD that is in all uppercase. I believe that this is getting closer, but the operator is not supported...
get-aduser -Filter {sAMAccountname -cmatch'^[A-Z]+$'} -Properties name,samaccountname
Any input?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a champ! Thanks! I had tried a variation of that, but looks like I had a problem with syntax.
Thanks a ton!
Thanks a ton!
Open in new window
but that doesn't change anything. Major issue is that the check has to happen on the client, and no cmdlet filter expression can be used.