It depends on what output you need. I have done the following to either gather output or to send output to chef for it to use.
1. Log output to a file using out-file
2. Put a sleep in the powershell script to give me the time to copy the temporary ps1 to another drive in order to troubleshoot any issues.
3. Use powershell_out to send and receive strings from ruby/chef.
Hopefully this helps.
> From: firstname.lastname@example.org
> To: email@example.com
> Date: Tue, 13 Oct 2015 14:33:27 +0000
> Subject: [chef] PowerShell script output: where does it go?
> Hello, everyone.
> Is there a convenient way to log the output of powershell_script? It looks to me like the Chef client (12.4.3) is creating temporary .ps1 files _and then deleting them_ at the end of the run.
> I appreciate any ideas and/or suggestions.
Archive powered by MHonArc 2.6.16.