Skip to main content
Solved

workflow halts when it gets to Powershell script


christopherlecky
Byte
Forum|alt.badge.img+16

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

Best answer by christopherlecky

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

The only arguments I used is 

-noprofile -noninteractive

Now it works.

View original
Did this answer your question?
If you have a question or comment, please create a topic

6 replies

MFasulo
Vaulter
Forum|alt.badge.img+12
  • Vaulter
  • 175 replies
  • April 26, 2022

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:

 

 


christopherlecky
Byte
Forum|alt.badge.img+16

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


Forum|alt.badge.img+7

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


Forum|alt.badge.img+6

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

 


christopherlecky
Byte
Forum|alt.badge.img+16

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.


christopherlecky
Byte
Forum|alt.badge.img+16

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

The only arguments I used is 

-noprofile -noninteractive

Now it works.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings