Errors will occur occasionally when you use the Windows PowerShell, such as when you are trying to set your location to a nonexistent directory or trying to remove a file without the required privileges.

In Windows PowerShell, there are two types of errors:

For example, if you are removing all of the .TMP files from a directory, you might not want the operation to stop if one of the files cannot be removed. Typically, you want to remove all of the files that you can remove, and then go back for the files that you could not remove.

The error that occurs when you cannot remove a file is called a non-terminating error. When a non-terminating error occurs, Windows PowerShell continues despite the error and then displays the error along with the output.

More serious errors will stop command processing. These are called terminating errors. Terminating errors stop the processing of the command. For example, if you submit data that is not valid or if you do not have the permissions required to perform the command, Windows PowerShell generates a terminating error.