diff --git a/CHANGELOG.md b/CHANGELOG.md index 642eef19a..5cfd133ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,10 @@ New Features: - Get-RscVmwareVm - Added -Relic switch. Use -Relic:$false to filter out Relics. -Relic will return only Relics. No usage of -Relic will return all (default operation). -Name parameter is now position 0, so you don't have to specify -Name. - Get-RscNutanixVm - New cmdlet to get Nutanix VMs - Register-RscRubrikBackupService - New cmdlet to register RBS on VMs + - New-RscSla - Now accepts -DailySchedule as a parameter Fixes: + - Issue [#112](https://github.com/rubrikinc/rubrik-powershell-sdk/issues/112) Breaking Changes: diff --git a/RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/Private/RscTypeInitializer.cs b/RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/Private/RscTypeInitializer.cs index 89048d57f..9f62b9233 100644 --- a/RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/Private/RscTypeInitializer.cs +++ b/RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/Private/RscTypeInitializer.cs @@ -308,11 +308,11 @@ public static object InitializeTypeWithSelectedProperties(string objectClassName } else { - IList value = (IList)returnInstance.GetType() + IList value = (IList)currentObject?.GetType()? .GetProperty(requestedPropertyTree[i], BindingFlags.IgnoreCase | BindingFlags.Instance | - BindingFlags.Public).GetValue(returnInstance); + BindingFlags.Public)?.GetValue(currentObject); currentObject = value[0]; }