What is the meaning of $?
in Powershell?
Edit: TechNet answers in tautology, without explaining what 'succeed' or 'fail' mean.
$?
Contains the execution status of the last operation. It contains TRUE if the last operation succeeded and FALSE if it failed.
I presumed $? would simply test whether $LastExitCode is 0, but I found a counter example where $? is False but $LastExitCode is True.