Hi All,
I am getting the below error when I run the script
script : get-process | Write-Output *>&1 | tee ".\Disk_Extend_Log_$date.txt" | out-host
Error : Application location is untrusted. Copy file to a local drive, and try again
I would like to get output both to console and output to file
Seems to be working for me (PS v5.1, PowerCLI 10.1.0 on Win10).
Which versions and platform are you using?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
On further testing, looks like this might be a UAC issue.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you very much for your assistance.
I think, i figured out the issue was caused because of variable defined
$date = Get-Date -format dd-MMM-yyyy_HH:mm:ss_tt
after changing the variable to
$Today = Get-Date -format dd-MMM-yyyy-HH-mm-ss-tt
It worked. Not sure, what caused error