How to capture PowerShell output after executing PowerShell command

Hi All,

Please suggest me to how to capture the log for after executing the command(Restart-Computer) on PowerShell.

While i am running the workflow then it is reboot the VDI machine so system is getting restarted. My requirement is capture the output log.

Kindly let me know if you need more details.

Thank You !!


Hi @sonu.kumar

Check this

you can print the log message activity and check it

Ashwin S

Are you running a process and restarting the host the process is running on or are you restarting a remote host from where the process is running?

According to the documentation Restart-Computer along doesn’t have any output so you’ll probably have to pair it with something else to determine if it was successful or not.

Log Message are updating on Orchestrator after trigger the command “Restart-Computer -Force” , is it possible to store output of a command in PowerShell to string or file after triggered the command “Restart-Computer -Force”.

Can you have any solutions for this.

Thank You !!