cohesity / cohesity-powershell-module

This repository provides a PowerShell Module for Cohesity DataPlatform. https://cohesity.github.io/cohesity-powershell-module
Apache License 2.0
42 stars 16 forks source link

Get-CohesityRestoreTask errors out when run. #214

Closed KuJoe closed 1 year ago

KuJoe commented 1 year ago

🐛 Bug Report

When running the command Get-CohesityRestoreTask without any parameters the command errors out (error below) and does not display any restore task information.

To Reproduce

  1. Run Get-CohesityRestoreTask
  2. View error.

Expected behavior

Expecting an output with a list of restore tasks.

During this testing I currently have 3 kCloneVMs (AWS) restore tasks in the Recovery tab in the web GUI (2 success, 1 cancelled).

Actual Behavior

The command outputs this error:

Get-CohesityRestoreTask : Error converting value "kCancelled" to type 'System.Nullable`1[Cohesity.Model.RestoreObjectState+ObjectStatusEnum]'. Path '[1].restoreObjectState[0].objectStatus', line 1, position 1291.

At line:1 char:1

+ Get-CohesityRestoreTask

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-CohesityRestoreTask], JsonSerializationException

    + FullyQualifiedErrorId : Newtonsoft.Json.JsonSerializationException,Cohesity.Powershell.Cmdlets.Recovery.GetCohesityRestoreTask
naveena-maplelabs commented 1 year ago

@KuJoe What is the Cohesity powershell module version you're using. Can you please try with 1.8.4 version?

pyashish commented 1 year ago

Please re-open it if you hit the issue. This is fixed in latest release.