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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

21 Mar, 2019 01:47 AM
20 Mar, 2019 11:39 PM
20 Mar, 2019 09:03 PM
20 Mar, 2019 08:55 PM
20 Mar, 2019 08:48 PM

 

20 Mar, 2019 08:02 PM
20 Mar, 2019 07:14 PM
20 Mar, 2019 06:27 PM
20 Mar, 2019 04:02 PM
19 Mar, 2019 06:21 PM
19 Mar, 2019 05:22 PM