Failed to connect to an IPC port: Access is Denied
The account that powershell runs under is a domain account, and is a local admin on both the local and remote boxes.
Script looks like:
==================
invoke-command -computername BUILD01 -scriptblock {
d:
cd "D:\BuildDrop\Testing_20091210.4"
$exe = "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe"
$vsmdi = "D:\BuildDrop\Testing_20091210.4\Release\WebTests\MyProject.Tests.vsmdi"
& $exe /testmetadata:$vsmdi /testlist:AllWebTests
}
===================
I've tried using the -Credential option too, but that made no difference. I'm not sure what security to tweak where to fix this error.
Suggestions?
http://www.ureader.com/msg/167336.aspx
It appears the issue is with MSTest, and not powershell alone.
If I run MStest using the SysInternals PsExec tool, it fails with the same error message.
What about the following suggesions?
http://social.msdn.microsoft.com/Forums/en/netfxremoting/thread/9bcb3ac6-8603-4dd6-b558-37642a488137
Thanks.
The example seems to be more for coding your own remoting components, when you have control over both the client and server.
In my case, I'm not writing my own, just trying to use powershell, or PsExec.
As a work around, I used powershell to write an event log entry on the remote box that runs MSTest. Then, on that box, I configured a scheduled task that is triggered by the event log entry, to run a powershell script that executes MSTest locally instead.
It is a bit of a hack, but seems to work. I would be interested to know why the documented methods above failed.
OK, so you said you're using a domain account to call this. Last thing I can think of: Are you running your PowerShell session with elevated privileges ("Run As Administrator")?
Else, I wish I had more advanced debugging skills to suggest something else...
Hi Marco,
I have the same problem. I invoke the mstest on a remote machine via invoke-command in PowerShell to execute some dummy test case which only trys to create a file and write something to it. But it failed, saying that "Failed to connedct to an IPC Port: Access is denied". Here is exactly how I did it:
PS C:\Windows\system32> Invoke-Command -computername <remote server name> -scriptblock { C:\ExecutionTools\mstest\mstestshim.exe /testcontainer:c:\o
netest.dll /test:UnitTest1 } -authentication credssp -credential <my credential, which is in administrators group on the remote server>.
Thanks,
Hongbo
Hi Marco, Hongo - Did this ever work for you?
I am getting exact same issue.
Thanks,
Himanshu
Hi Marco,
After so many years passed, has anyone worked around this? I've got the same problem here.
-Jingfei
Hi Marco,
After so many years passed, has anyone worked around this? I've got the same problem here.
-J