$AliasName = "Zhao, Janice (KDC/HR)";
$matches = [System.Text.RegularExpressions.Regex]::Matches($AliasName, "(\w+)\,\s(\w+)\s");
$first = $matches[0].Groups[2].Value;
$last = $matches[0].Groups[1].Value;
$outlookApp = New-Object -ComObject Outlook.Application;
$oGAL = $outlookApp.GetNamespace("MAPI").AddressLists("Global Address List")
$myAddrEntry = $oGAL.AddressEntries($AliasName)
$exchUser = $myAddrEntry.GetExchangeUser();
If([system.string]::IsNullOrEmpty($exchUser)){
$GetAddress = "";
}
ElseIf($exchUser.FirstName -ne $first -or $exchUser.LastName -ne $last){
$GetAddress = "";
}
Else{
$GetAddress = $exchUser.PrimarySmtpAddress;
}
Write-Host $GetAddress;