Skip to content

Instantly share code, notes, and snippets.

@onurbabur
Created October 29, 2021 19:10
Show Gist options
  • Select an option

  • Save onurbabur/aaeafc3a6eca2a6567486d665e64c65e to your computer and use it in GitHub Desktop.

Select an option

Save onurbabur/aaeafc3a6eca2a6567486d665e64c65e to your computer and use it in GitHub Desktop.
TurkishCharacterUsageQuery.ps1
$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