A Seyam A Seyam - 8 months ago 54
PowerShell Question

Filter Arabic Words Using PowerShell

We have some accounts in the Active Directory with an Arabic display name and we want to change it to English, but I don't know how to get these accounts first using PowerShell. I use Quest ActiveRoles to query the Active Directory

Get-QADUser -SizeLimit 0 -SearchRoot "OU Location" | ? {$_.displayName -contains "The Arabic Letter Filter"}



You could test with a regular expression to find Arabic letters in the names. The following would yield True because of the Arabic letter (ـأ) in the middle of the word:

"Blaـأ‎Bla" -match "\p{IsArabic}"