rubrikinc / rubrik-scripts-for-powershell

Collection of PowerShell Scripts created to interact to Rubrik CDM
MIT License
50 stars 58 forks source link

Reporting/Get-Archive-Backlog.ps1 can not gather requested snapshots for Filesets #125

Open WalshMichaelJames opened 5 years ago

WalshMichaelJames commented 5 years ago

What happened: "($fileset | get-rubrikfileset).snapshots" function fails to complete. What you expected to happen: The archive snapshots for the Filesets to be produced How to reproduce it (as minimally and precisely as possible): Connect to Rubrik cluster and run the below: $all_filesets = Get-RubrikFileset -PrimaryClusterId local $fileset = $all_filesets[1] ($fileset | get-rubrikfileset).snapshots #produces error $fileset | get-rubrikfileset #produces 0 results skewing fileset archive figures (saying there is no backlog when there is) Anything else we need to know?: It is used in line 194 of the powershell script. I am using Rubrik CDM 5.0.2 and Rubrik powershell module version 4.0.511

WalshMichaelJames commented 5 years ago

Testing this, it appears as though this works in Rubrik module v4.0.0.157, but not in v4.0.511.

WalshMichaelJames commented 5 years ago

In the "Get-RubrikFileset" function. If I change this:

Rubrik's fileset id

[Parameter(ParameterSetName='ID')]
[Parameter(ValueFromPipelineByPropertyName = $true)]    
[ValidateNotNullOrEmpty()]

To this:

Rubrik's fileset id

#[Parameter(ParameterSetName='ID')]
[Parameter(ValueFromPipelineByPropertyName = $true)]    
[ValidateNotNullOrEmpty()]

The get-archive-backlog.ps1 script completes without errors