0
Answered

Subsequent EvB Operations do not wait for PowerShell Script Operations to complete before start

Matthew Woolnough 8 years ago updated by anonymous 8 years ago 5

Scenario: Run Profile Operation, followed by a PowerShell Script Operation, followed by a Run Profile Operation;


The Run Profile Operation is executed, Success/Failure is evaluated, PowerShell command then runs. The 2nd Run Profile Operation appears to occur immediately, without a wait for the PowerShell operation to complete. There does not appear to be any evaluation of if it was Success/Fail.



Answer

Answer
Answered

Hi Matt,


I'm not the best at PowerShell but as I understand it, your script is a Pipeline script (i.e. it defines BEGIN, PROCESS and END), and as such is inappropriate for use as an operation (which isn't part of a pipeline).

I am using a similar construct at QBE ... whereby the second run profile operation is configured as a child operation of the powershell operation which is specifically designed to return an error condition to allow EvB to determine success/failure), rather than a "next" operation. Could that be the problem here? The script must return the success status cleanly. You will find the specific script I use here: https://bitbucket.org/unifysolutions/solutions.mcs.qbe/src/3fe1620eb2bd97e82c183e0d3fc21af2b6a992b7/FIM1/Operations/Scripts/Halt-ThresholdExceeded.ps1?at=default&fileviewer=file-view-default

"You do not have access to this repository.". Can you share file directly, please?


Just shared the repository with you - please try again Matt

thanks bob, will take a look

Answer
Answered

Hi Matt,


I'm not the best at PowerShell but as I understand it, your script is a Pipeline script (i.e. it defines BEGIN, PROCESS and END), and as such is inappropriate for use as an operation (which isn't part of a pipeline).