Team , I wrote on program that install some software and after that it display exit code by below .
$SoftwareInstall.ExitCode
It returns 0 and other value depend upon how installation goes. I have some other expression after that to execute only if the exite code is success that is 0 . How to setup a check for this using if condition . Can you please suggest if below is the right way to do
if ( $SoftwareInstall.ExitCode -eq 0){
"Software Installed successfully "
#Then some other code I'll put here
}
else{
"Software did not installed"
}
Please suggest .