-
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
Added DetailedObject parameter to Get-RubrikVM #264
Conversation
I added an additional parameter -DetailedObject, If anyone has a suggestion for a different parameter name I would be happy to update it. The idea of the change is to prevent the unintuative approach of having to pipe Get-RubrikVM myvm01 into Get-RubrikVM in order to get full details. The switch parameter abstracts this away for the user to give consistent results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea. It's not fun having to request the VM details a second time. I just made one small suggestion before merging. 👍
Rubrik/Public/Get-RubrikVM.ps1
Outdated
@@ -27,6 +27,10 @@ function Get-RubrikVM | |||
.EXAMPLE | |||
Get-RubrikVM -Relic | |||
This will return all removed virtual machines that were formerly protected by Rubrik. | |||
|
|||
.EXAMPLE | |||
Get-RubrikVM -id myserver01 -DetailedObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this example should use the Name
param.
Get-RubrikVM -Name 'Server1' -DetailedObject
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool I updated the description and added a progress bar for DetailedObject queries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
Description
Get-RubrikVM inconsistent results
Related Issue
#262
Please link to the issue here
Motivation and Context
Currently Get-RubrikVM -Name and Get-RubrikVM -id return different datasets, which can be confusing from a user perspective. I added the -DetailedObject parameter, to execute an additional query by ID to retrieve the full details on the computer object.
How Has This Been Tested?
I created an if-else statement that will execute a second query. I tested this code against the TM lab environment
Screenshots (if appropriate):
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!