cancel
Showing results for 
Search instead for 
Did you mean: 

PowerShell Stop-Process testcomplete returns "Access denied" with testcomplete 14

Occasional Contributor

PowerShell Stop-Process testcomplete returns "Access denied" with testcomplete 14

We're using Powershell script to run our night tests.

Tests are executed by testComplete. The script stops testCompletete force, before starting a new instance and running the project.

After I've updated to testCompletete14, the code below stopped working

 

$testCompleteProcess = Get-Process -name TestComplete -ErrorAction "Ignore"

if ($testCompleteProcess -ne $null) {
echo "Stopping TestComplete..."
Stop-Process -Name TestComplete
} else {
echo "No running TestComplete process found"
}

 

returns error "Access is denied"

How should I stop testComplete from ps1?

2 REPLIES 2
Community Hero

Re: PowerShell Stop-Process testcomplete returns "Access denied" with testcomplete 14

This appears to be working just fine for me, as we do something similar. Is it possible the script and test complete instances are running under different users? Are you running both as administrator? 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Occasional Contributor

Re: PowerShell Stop-Process testcomplete returns "Access denied" with testcomplete 14

I'm running both testComplete and PowerShell NOT as administrator, but as the same user. 

New Here?
Join us and watch the welcome video: