PowerShell scripters have a variety of methods that they can use to display information on the host. Before we begin this lesson, remember that PowerShell should send an object as it’s output to the PowerShell pipeline. In many cases, the author of a cmdlet may want to display other information. This can include debugging or progress information. Here are a few cmdlets and some information to help you understand their usage. Write-Output This is the proper way of sending output into the PowerShell pipeline. Remember that this should be the object that is the end result of the code that was just executed. This is also how we return information from a function to its calling statement. Write-Host This is the easiest cmdlet to use to instantly display information on the host. The – ForeGroundColor and – BackGroundColor parameters allow you to use 16 different colors to emphasis your displaying information. Example: PS C:\> Write-Ho...
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.