Powershell Scripting TutorialIntroduction Tools required for Powershell First Powershell script Interacting with userSpecial characters in Windows Powershell scriptingArrays String manipulation Conditional statements Looping statements Passing arguments Passing named arguments Exit status of the script Writing functions
exit status in windows powershell scriptingYou can use below variables to see if the last command was successful or not.
If the last command was successful, $? will return True. Otherwise it returns False. If the last command was successful, $lastExitCode will have 0 value. Otherwise it has a non zero value. To return an exit code from script, you can use below command.
Web development and Automation testing