Created
October 29, 2021 19:10
-
-
Save onurbabur/aaeafc3a6eca2a6567486d665e64c65e to your computer and use it in GitHub Desktop.
TurkishCharacterUsageQuery.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $objects = Get-ADUser -Filter * -SearchBase "OU=TURKEY-TR,OU=Accounts,DC=babur,DC=com" -Properties samaccountname, pwdLastSet | |
| foreach ($object in $objects) { | |
| if (($object.samaccountname -like '*ö*') -or ($object.samaccountname -like '*ı*') -or ($object.samaccountname -like '*ğ*') ) { | |
| Write-Host "Name contains '$'" | |
| $object.samaccountname | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment