PowerTip: Send Message to Information Stream in PowerShell

Dr Scripto

Summary: Use Windows PowerShell to send information for a command to a separate information stream.

Hey, Scripting Guy! Question How can I use Windows PowerShell to send information to a user via a separate information stream,
           without changing the default information preference variable?

Hey, Scripting Guy! Answer In Windows PowerShell 5.0, use the new Write-Information cmdlet, for example:

gps ; Write-Information "process information" -InformationAction continue

Note  gps is an alias for the Get-Process cmdlet.

0 comments

Comments are closed. Login to edit/delete your existing comments