-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run Export-RubrikVM - Illegal request in Invoke-RubrikWebRequest.ps1 line 18 #627
Comments
Hi Kamfaima, Thanks for reporting this issue, I'll try to replicate this in our test cluster and give an update here once I've triaged this issue. |
Hello Kamfaima, It looks like you're entering in the entire snapshot object instead of just the id, that's why the url also looks malformed:
So using your code this should solve the issue:
If you like some other alternative of making your code easier to read you could use splatting as well:
Or if you feel like overengineering your splatting you can also splat inside of your initial splatting hashtable:
Let me know if that works for you! |
Hi @jaapbrasser - I can confirm that passing the id works, thanks for spotting that user error - doh! Does there need to be better error parsing/catching within the |
That looks good - thanks for incorporating my idea as a fix! |
No problem at all, I marked it as ready for review so your idea will be merged into the repo over the coming days. |
Export-RubrikVM - Illegal request in Invoke-RubrikWebRequest - Fix #627
Current Behavior:
Trying to use Powershell to export a VM snapshot to a host and datastore from https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/export-rubrikvm#example-2
Note that the original single line command has been broken up into several lines for readability.
Expected Behavior:
I'd expect Rubrik to being exporting the VM to the desired location. Running the identical command with
-whatif
seems to validate that the actual command and parameters are correct.The problem instead seems to stem from
Invoke-RubrikWebRequest.ps1
as per the verbose error message above.Steps to Reproduce:
Happens every time both on MacOS and Windows 10 (see Context for more information)
Context:
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
The text was updated successfully, but these errors were encountered: