Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to redirect verbose to the log file...

$
0
0

Test1.ps1 has below code.....

## Calling script to spool the verbose log to a log file ##

$ScriptPath = Split-Path $MyInvocation.MyCommand.Path
Invoke-Expression "& `"$ScriptPath\Test2.ps1`" $InstallPath $BackupPathApplication"

Now I want to redirect/append output to the log file...Not sure how to pass that in the invoke-expression?

Invoke-Expression "& `"$ScriptPath\Test2.ps1`" $InstallPath $BackupPathApplication >> Logfile.log" ?


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>