First time sharing, so feedback is much appreciated, but please excuse my code if it’s not up to par with those who have a lot more experience with Powershell than I.
I recently had a client who -- for legal purposes -- needed to restore the same folder from two month’s worth of backups. Running 61 File Level Restores in the GUI seemed like a nightmare, so he opened a case asking if there was an easier way. Unfortunately, through the GUI there’s really not an easier way, but this sounded like a perfect scenario for leveraging some Veeam PowerShell cmdlets. I soon discovered that the FLR cmdlets don’t have functionality that supports a ‘Copy To’ feature like you’d get in the GUI, so I had to leverage what Veeam cmdlets we do have and then add in some good old basic PowerShell commands to then pull the data from the mount point (C:\VeeamFLR\ by default) and move it to the target, then loop through n-number of times based on the user input.
Here’s what I came up with. I’m still working on it and trying to improve it, so I’m definitely open to feedback on what I have. Even if it’s just to point out an easier method of doing something I’ve managed to pull off in some ugly, less efficient way. My purpose for making this was not just to help out a client (although technically support doesn’t create custom scripts for clients) but I felt this was a perfect excuse for me to learn PowerShell more in-depth and expand my knowledge of Veeam and PowerShell at once.
I plan on submitting it to VeeamHub as well, but I haven’t got around to it. I wanted to share what I currently have with the community in hopes someone else will find it helpful and/or provide more opportunities for me to learn!