It is possible with the TFS API. This PowerShell script show you how to do that (see: https://blogs.msdn.microsoft.com/gautamg/2012/01/01/how-to-associate-automation-programmatically/ for reference).
# Get TC
$tfsTpc = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($TPC_URL)
$tms = $tfsTpc.GetService([Microsoft.TeamFoundation.TestManagement.Client.ITestManagementService])
$tp = $tms.GetTeamProject($TP_NAME)
$tc = $tp.TestCases.Find($tcId)
# Compute Automation Guid
$sha1Crypto = new-object System.Security.Cryptography.SHA1CryptoServiceProvider
[Byte[]] $bytes = New-Object Byte[] 16
[Array]::Copy($sha1Crypto.ComputeHash([System.Text.Encoding]::Unicode.GetBytes($testName)), $bytes, $bytes.Length)
# Create association
$tc.Implementation = $tp.CreateTmiTestImplementation($testName, $AUTOMATION_TYPE, $AUTOMATION_STORAGE_NAME, $automationGuid)
$tc.Save()
$automationGuid = New-Object -TypeName Guid -ArgumentList @(,$bytes)
But you will not be able to associate the execution with the Test Case in TFS.
The test must be run with MSTest V1 to log results as a valid TRX to be published in TFS through TCM.exe. Even with vstest.console.exe and the TRX logger option the xml result is not understandable by TCM.exe.
For reference see: http://bugsareinthegaps.com/uploading-automated-test-results-to-mtm-made-easy/