Skip to main content

Pretty straightforward I am attempting to run a Powershell script from workflows using the 

ExecuteScript activity

 

The issue is that it simply halts when it gets to the script.

No error, nothing in the logs it just halts.

any ideas?

 

Batch files work just fine, and the executable path for Powershell is set

Not sure if this is your problem, but I always specify a Username and password to run the script and I always start it in a named directory:

 

 


I usually leave it empty for batch files and it works fine as it runs under the service context.


Is the powershell getting launched on the remote machine? Can you check cvd.log of the remote machine for any clues?


Is there any log entries in the EvMgrS log or CVD log on the client you are trying to run the powershell script on?

 


There is nothing in the EvMgrS log, but CVD has the following :

CreateProcessWithExplicitHandles() - Creating process with special handles. Ret:[122]

I googled it and that 122 error translates to ERROR_INSUFFICIENT_BUFFER, which seems to indicate that the arguments field is too long.

I’m going to drop some of them and see what happens.


I shortened the list of arguments and it eureka, it works.

The only arguments I used is 

-noprofile -noninteractive

Now it works.