We have a desire to do verification of all of our backups at least once a week using automated restores. In past jobs, I found this easy as I had access to the backups and could either use a SQL Server Agent job or a Powershell script. With CommVault, though, I am finding this difficult. I can get a batch file and an XML file for a specific system, but I need something more robust. In essence, I want to get a list of all our agents, like 100 instances, and several of those split into multiple AG groups, start at 8 AM each day from where I left off, and run until 5 PM doing restores. The loop would restore the database, run DBCC CheckDB, delete the restored DBs, and go on to the next instance as long as there is time.
However, the Powershell docs are fragmentary on how to do this. I cannot imagine we are the first customers who want to script a restore process like this. Without resorting to the batch files, is there not a way to write a Powershell script to do this? Are there any examples to use as reference that we could adapt?