Get value from inside powershell script

In your PS script you can save the true/false to the clipboard using Set-Clipboard and then in UI.Vision read it with ${!clipboard}