Get-Process -Name doesnotexist
Write-Host -Object "Was the last operation successful? $?"
Contains the execution status of the last operation. It contains TRUE if the last operation succeeded and FALSE if it failed.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents