rubrikinc / rubrik-sdk-for-powershell

Rubrik Module for PowerShell
https://build.rubrik.com/sdks/powershell/
MIT License
102 stars 87 forks source link

2 new functions for downloading files from vmware snapshot (made them already but fails to get help and UI working) #820

Closed MatsBEkman closed 1 year ago

MatsBEkman commented 1 year ago

Is your feature request related to a problem? Please describe.

This is related to restoring files from VMSnapshots. We are tagging every backup with a file that can be searched for when we want to do restore. FindRubrikFile returns the snapshotid and Get-RubrikVMSnapshot gets the snapshot itself based on that The current functions Get-RubrikDownloadLink and Start-RubrikDownload does not work together with these types of snapshots. 85% of our snapshots are of the VM type

Describe the solution you'd like

I have already made 2 new functions called Get-RubrikVMDownloadLink based on Get-RubrikDownloadLink Start-RubrikVMDownload based on Start-RubrikDownload I have registered them in Rubrik.psd1 under FunctionsToExport I have also tried to change the help content in Rubrik-help.xml

I can install them and use them for my purposes but the UI for choosing parameters I cant change so I am using the same parameters that where in the functions I based the new functions on and then changing the @body later in the new scripts as well as the @uri

Describe alternatives you've considered

I tried to look in the Get-RubrikAPIData.ps1 to see if I could find any definitions for the original functions that I used as a template and the new ones there but there where no description for either Get-RubrikDownloadLink or Start-RubrikDownload there. Now I have good code that is working but it is a fork and I want it to be included in coming releases

Additional context

I would like to give the functions I have and maybe You can do the last bit to include these in coming release. The parameter SourceDir I think should change to Sourcepaths to make it more clear what is downloaded. Also the help text needs to change and the examples. I can provide You these samples. Rubrik-newfunctions.zip

mwpreston commented 1 year ago

resolved with latest PR