Commvault / CVPowershellSDK

Developer SDK - Powershell
12 stars 12 forks source link

Get Sql Database files list : Get-CVSQLDatabaseFilesList #18

Closed mdaniou closed 1 year ago

mdaniou commented 3 years ago

Hi all,

First, thanks a lot for all these cmdlets. This is really useful.

Now I need some guidance to get the list of the database files.

The context is that I am building a DR process meaning that I need to automatically restore all the databases of a sql server instance and I can't know the list of the files of the databases files before eventually exucuting the Cmdlet Restore-CVSQLDatabase.

Could you please help me figure how I can get this information ?

I would be more that happy to write the function myself and create a PR to share it.

Thanks a lot for your help !

Br, Max

mdaniou commented 3 years ago

I got the answer on Reddit : https://www.reddit.com/r/CommVault/comments/kaayaq/how_to_retrieve_the_sql_server_database_files_in/

The API is : https://api.commvault.com/#43105265-f55a-4eb4-a335-f16f40d9d189

I have written a new Cmdlet for this, I will push a PR and it will have been properly tested.