Sometimes, we need to know, if our PowerShell command run successfully or not.
Normally if there are any errors, we see them in red. But still!!
There is a special variable in PowerShell, Dollar sign and question mark $?, which tell about , if the last command runs successfully or not. If the command runs successfully, the output is set to true, and it the command doesn't run successfully, the output contains False.
Now, you must be thinking, what will happen, if the -ErrorAction is set to SilentlyContinue. And you are not able to see the red-error code, in-those-scenario $? is really helpful to know , if the command runs fine or not.