Commvault / CVPowershellSDK

Developer SDK - Powershell
11 stars 12 forks source link

Disable Backup Activity on Client #7

Open CraigTolley opened 4 years ago

CraigTolley commented 4 years ago

I am attempting to disable backup activity on a client, using the Get-CVClient and Set-CVClient cmdlets. The code I am using is shown below, but this is not updating the client properties. These are the properties that seem to change when I update a client in the GUI.

Is this the right method to update the enabled backup activities for a client?

$CvClient = Get-CVClient -AllProperties -Name $ClientName
$CvClient.clientProps.activityControl.EnableDataManagement = $false
$CvClient.clientprops | Set-CVClient -Name $ClientName

Alternatively I tried this, also not working

$CvClient = Get-CVClient -AllProperties -Name $ClientName
$CvClient.clientProps.clientActivityControl.activityControlOptions[0].enableActivityType = $false
$CvClient.clientprops | Set-CVClient -Name $ClientName

Am I missing something on how to change the activity?

CraigTolley commented 4 years ago

I think I have possibly found the answer as to why this is not working. In the API documentation, https://documentation.commvault.com/commvault/v11/article?p=45918.htm, activityType falls under the activityControlOptions element.

The Set-CVClient code only pushes changes (that I can see) to the 'clientProperties' node (line 956) or Commvault.CommCell.psm1.

Are you already working on extensions to this function?

gstoops commented 4 years ago

Hi, thanks for sharing your question. Yes, extensions of existing Set-CVClient functionality are in the works. I will investigate your specific issue next.

CraigTolley commented 4 years ago

Any news on this development? It's becoming quite urgent for us.