Oct 18 2021
Just like in Linux, you can use $? to find the output of last command executed, is there any powershell command that I can use on the command line?
I tried $? but it returns True or False.
Oct 31 2021
As far as I know, in Linux $? returns exit status of the most recently executed foreground pipeline. (Reference).
In PowerShell it does pretty much the same returns True or False depending on whether the last command (cmdlet or native) exited without error or not. (Reference)
Not sure what you are trying to accomplish and what your use case is but I suppose this could help you: https://stackoverflow.com/questions/43094708/powershell-exit-status
Hope that helps.