Output

If your cmdlet does something, chances are, you will want to return what has been done as the output of the cmdlet. Even if your cmdlet does not use the verb Get (for example, it just removes an entry in a database), you might want to return a reference to what has been modified (or, in this case, removed).

It is also important to convey messages to the users of your cmdlets. However, it is recommended that you not use Write-Host to do so. Just think of all of the built-in cmdlets, and ask yourself: do I want to see command-line text every time I run the cmdlet?

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

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