Skip to content
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

New-RubrikReport does not allow use of all templates #628

Closed
railroadmanuk opened this issue May 18, 2020 · 3 comments · Fixed by #629
Closed

New-RubrikReport does not allow use of all templates #628

railroadmanuk opened this issue May 18, 2020 · 3 comments · Fixed by #629

Comments

@railroadmanuk
Copy link
Contributor

Current Behavior:

Create report using ObjectProtectionSummary template:

PS /mnt/c/WINDOWS/System32> $report = new-rubrikreport -Name $ReportName -ReportTemplate 'ObjectProtectionSummary' -Verbose
New-RubrikReport: Cannot validate argument on parameter 'ReportTemplate'. The argument "ObjectProtectionSummary" does not belong to the set "ProtectionTasksDetails,ProtectionTasksSummary,SystemCapacity,SlaComplianceSummary" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.

Expected Behavior:

Can use any of the available templates. In 5.1 this is the list:

image

Steps to Reproduce:

See above.

Context:

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Rubrik PowerShell Module Version: 5.0.1
  • PowerShell Version: 7.0.0
  • Operating System: WSL 2 / Ubuntu 20.04
@jaapbrasser
Copy link
Contributor

I added additional reports to the valideset, how does this look @railroadmanuk ?

@railroadmanuk
Copy link
Contributor Author

railroadmanuk commented May 27, 2020 via email

@jaapbrasser
Copy link
Contributor

I would opt for just letting it throw, as the alternative is to create a dynamic parameter based on the API version and dynamic parameters are a bit of a pain in PowerShell. I think it should be clear enough when it fails because an unsupported report is requested on a older CDM version.

Good feedback though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants