i need to redirect a output of a command to two files say file1 and file2 file1 is a new file and file2 is already existing file where i need to append the output i have tri
In PowerShell use tee-object (or its tee alias)
tee-object
tee
command | tee first-file | out-file second-file
Can also tee to a variable (e.g. for further processing).