Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Capture Output problem ?

$
0
0

Hi guys, im a beginner at powershell, and i'm stuck.

I'm trying to capture the output from a powershell script that is started from a batch file. I triede all the usual thing like, > and Out-file " but nothing works, it just creates an empty file. Hope you can help me.

 

This is how my script looks in working form. Remember that i run this line in a batch file.

 

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -Verb RunAs -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""\\tsm-dc01\e\TSM-Udrulningsscript-BA-Client\TSM Client Install Script.ps1""' }";

 

I want to capture the output from the script

\\tsm-dc01\e\TSM-Udrulningsscript-BA-Client\TSM Client Install Script.ps1

Into a .txt file

 

Hope you guys can help.

 

Best regards

/Hauge

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles