I'm invoking BaselineLocalInstall.ps1 as part of my automated server deployment. I need to detect if it ran successfully and without errors, or if it failed. The script doesn't return a status code, nor any output that let's me know whether the script completed successfully or failed.
What's the best way to check if the script ran successfully, so I can decide if the VM is safe to be deployed, or needs to be destroyed?