Write-Host from called powershell script e.g. . TestScript.ps1

matt_mckinstry's Avatar

matt_mckinstry

05 Mar, 2019 12:56 PM

Id like to write to the host console from powershell scripts called from appveyor.yml for example

- ps: . somepsscript.ps1

somepsscript.ps1

$test = "blahblah"
Write-Host "do something in here"

Is this possible? How do i redirect the Write-host call from my called Powershell script to the appveyor console

  1. Support Staff 1 Posted by Owen McDonnell on 05 Mar, 2019 05:11 PM

    Owen McDonnell's Avatar

    No need for redirection.
    Just call the script like this...

    -ps: .\somescript.ps1
    

    ..and you'll see your message.

  2. Ilya Finkelshteyn closed this discussion on 05 May, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM