When you send a message via a similar mailto: link, the mail client is the MAPI client. If you want to find out where this MAPI client is, here's a function to get that information from the registry.
Copy Code code as follows:
Functionget-mapiclient
{
Functionremove-argument
{
Param
(
$CommandLine
)
$divider = ' if ($CommandLine. StartsWith (' "))
{
$divider = ' "' $CommandLine = $CommandLine. SubString (1)
}
$CommandLine. Split ($divider) [0]
}
$path = ' Registry::hkey_classes_root\mailto\shell\open\command ' # Create new object to return values
$returnValue =1| Select-object-propertyhasmapiclient,path,mailto$returnvalue.hasmapiclient=test-path-path$pathif ($ Returnvalue.hasmapiclient)
{
$values =get-itemproperty-path$path$returnvalue.mailto= $values. ' (default) ' $returnValue. Path=remove-argument$returnvalue.mailtoif ((Test-path-path$returnvalue.path)-eq$false)
{
$returnValue. hasmapiclient= $true
}
}
$returnValue
}
Get-mapiclient
The results are similar after execution:
Extrapolate, you can also modify the code to query other types of default clients.