Powershell Output to WPF

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 2 weeks, 3 days ago.

  • Author
  • #67948
    Profile photo of Rishabh Verma
    Rishabh Verma

    How can i get powershell output to WPF window. For example :

    Write-Host -ForegroundColor Red -NoNewline "Connection down..."


    Write-Output "$(Get-Date): Connection up!"

    How to bind it to textBox in WPF.

  • #67995
    Profile photo of Don Jones
    Don Jones

    You can't "bind it" to a textbox. You have to modify the Text property of the TextBox object and set it equal to whatever text you want displayed.

You must be logged in to reply to this topic.