July 2018
Beginner
552 pages
13h 18m
English
In order to convey information to the user, you already know that Write-Host should not be used at all. There are exceptions to that rule, of course—mainly when querying the user for information, or when displaying one-time information, such as a consent to the usage of telemetry.
Other than that, make use of the following streams, as required by the type of message that you need to convey:
| Write-Verbose | Verbose information that explains what the cmdlet is doing at the moment |
| Write-Debug | Debug information that should help you debug the code if a user has issues with it |
| Write-Information | Taggable messages that can be attributed to, like components in your script |
| Write-Warning | Warnings that are visible, by default ... |
Read now
Unlock full access