Parsing RoboCopy logs

Confession: I’m a newb in PowerShell…I can get around but I need a LOT of education in PS.

Problem: I’m trying to get a PowerShell script to run and pull the failed RoboCopy notifications from our numerous RoboCopies that we run nightly. (You know…that nifty table at the bottom of the Robocopy log.) I have a script that I think should do the trick…I think. I can post this script if necessary.

My question being, it’s using a variable “$filePath”. How do I specify the “$filePath” for this variable?

This: $filePath=servershare This: $filePath -Path ServerShare

I’m not sure.

However, if there’s a better way/cleaner way to get the RoboCopy logs read, I sure be appreciative of any direction. I just don’t want to go to each server involved, double click, scroll all the way down and read each log file that way.

I’m really trying to run one command and have all the success/fail/etc. data to go into one .CSV file.

Any help on this from the PS gurus would be fantastic!

submitted by /u/JBHedgehog
[link] [comments]

Leave a Reply