How to show PowerShell output file in deployment?

I have a package using PowerShell that is just starting a program (Transwiz) to backup user data.

The program has an option of creating a log file to view so I currently have it pointed to some folders on a server.

How can I get the output log to show up on the PDQ deploy steps instead?

Overall what I want to do is, start program > output log when finished > move to next step

1

Comments

4 comments
Date Votes
  • If you want the contents of that log file to show up in Deploy's Output Log, you'll need to either read its contents to stdout (Get-Content) or copy it to the runner directory ($PWD) and name it "output" (you will need to overwrite the existing file).

    1
  • I saw something in the documentation about stdout, but I had no clue what that meant (Everything online was pointing me to use "Write-Output" which didn't work).

    I only ran into one issue but I used Get-Content and that worked beautifully. Thanks!

    This might be more for the PowerShell side but now I can see the output, but just the beginning of it and not when its done. Is there a way I can look into making sure the output log is finished updating before it sends the details back and moves to the next step?

    0
  • You'd have to somehow detect that the program is done running. I'm not familiar with Transwiz, so I wouldn't know what to look for.

    1
  • The Devs for that program are pretty good so I will have to contact and ask. Thank you for the help Colby, much appreciated.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post