I was able to find the solution to invoke the msbuild default target (i.e. target =TestMethod) from a powershell script. Please find the example below :
Powershell Script:
MSBUILD Path
$msbuildexe = (get-itemproperty -path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0").MSBuildToolsPath + 'msbuild.exe'
Function to Invoke TestMethod
function Invoke-TestMethodFromPowershell([string]$testProjFile) { echo "Calling msbuild Started ..." &$msbuildexe $testProjFile echo "Calling msbuild Completed ..." }
Invoke-VeracodeScanSubmissionProcess("C:\Temp\HelloWorldTest\TestBuild.proj");
Screenshot: