I am working on a new script in Powershell and I would like to ask if someone know of a method or function to replace all "Non-English" letter in a string to English letters. The reason for this is due to the New-ADUser function where AD only accepts English letters for SamAccountName and UserPrincipalName.
Example of a string would be
$Name= "TRẦN NGÔ ỬNG HẠNH"
There will be names with all kinds of Non-English letters both Asia, Europe, etc hence its would not be sufficient with simple If-Then Replace.
if ($Name= -like "*Ầ*")
{
$Name = $Name.replace('Ầ','A')
}