rubrik-sdk-for-powershell
rubrik-sdk-for-powershell copied to clipboard
Get-RubrikVM (VM name) |get-Rubrik Snapshot -latest not working in a script
When I run the command from the PowerShell command line, it works great. If I try putting it in a script to loop through a bunch of VMs, it comes back with the following error:
Get-Rubrik Snapshot : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
For some reason, the Get-Rubriksnapshot is able to get the information from the Get-Rubrik VM output.
Anyone able to assist with why it works command line, but not in a script?
HI @zencpu - Can you post your script?
Get-RubrikVM MyVM | Get-RubrikSnapshot -Latest works fine for me - where MyVM is the name of a VM