Don’t do that #26: Test the network status of a computer within the process block

By | July 12, 2015

Don’t do that: You are checking if the path provided in the parameter is valid or not.

 


Do that: It is better to use the ValidateScript validation attribute.

It requires less lines of code and also the error generated is generated by PowerShell and automatically translated to the language of the user running that.


previous-buttonnext-button

Leave a Reply

Your email address will not be published.