$roledetails = ./btp get security/role-collection `"$Role`" | Out-String
I have above command in PowerShell which executes the executable btp.exe using parameter provided. If it was successful, it provides "OK" and returns the results. I can capture result using $roledetails upon successful but not able to capture "OK" value which is printed on PpowerShell Command line.
If it is failure it prints "FAILED" value on screen and returns blank value in $roleDetails.
How do I capture "OK" OR "FAILED" system message ?
When it is