How it works...

By default, the error action preference is Continue, which means that PowerShell would display the error, and continue with the execution of the rest of the script (this effect is not noticeable when running individual commands, hence the creation of the two-liner, or three-liner in case you added Clear-Host at the top). By setting ErrorActionPreference to SilentlyContinue, we instruct PowerShell to record the error but not show it on the screen, and at the same time, go on with executing the rest of the script.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.51.241