I have a psm1 which is called from a scheduled task that happens around midnight. At this point I’m still developing it and I just want to read everything that’s happening(getting backups, zipping things, moving things etc…)
Is there a way I can basically do what this pseudo code is saying?
Task scheduler calls test.bat which contains:
PowerShell.exe -Command “& ‘TestScript’” >2&1 | “C:\backup\whats_going_on.txt”