I run a script that backs up some of our DC's that does basically what you are looking for. I think I sanitized it enough that I can post it, but of course you will need to make changes to it for it ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results