Toolbox: Green tick after non-Success Return Code

I just started using the Toolbox, and have created a Tool (Run a script > PowerShell Script) running a PowerShell cmdlet based that does not exist on Windows 7. The PS code is the following.

Get-BitLockerVolume -ErrorAction SilentlyContinue
If ( -Not $? )  { Exit 1 }

(without that last line, it would always return 0, even on Windows 7)

When run on a Windows 10 machine, it works as expected (return code 0, green tick). However, when running against a Windows 7 machine, I get message “Tool finished with return code 1” yet the icon next to it is a green tick. Green ticks, to me, indicate success.

I have also tried using “Base the success of this tool on the tool’s return code”, setting Success Return Code to 0, but it did not change anything.

Hopefully it’s not something I’m simply overlooking.

My suggestions for Toolbox:

  • Have a different colour icon for a non-success return code
  • Provide the return code, possibly as a new column (named RC?) next to each PC in the Tool run’s results list
  • Provide the same information (icon, return code) in each level of the tree, as it only appears to be present at the highest level

Hi Steven,

After testing this I was able to reproduce it and I think there may be a bug. I’ll need to check but I believe the failure should be marked with a red cross. I’ll make a note for us to look into it.