rubrik-sdk-for-powershell icon indicating copy to clipboard operation
rubrik-sdk-for-powershell copied to clipboard

Get-RubrikVM (VM name) |get-Rubrik Snapshot -latest not working in a script

Open zencpu opened this issue 1 year ago • 1 comments

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?

zencpu avatar May 15 '23 19:05 zencpu

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

mwpreston avatar Jun 13 '24 16:06 mwpreston