Solved

Change CVClientName with Powershell API

  • 28 February 2023
  • 2 replies
  • 85 views

Badge +1

Hello,

 

I have tried the Powershell CLI to rename a client name as described in the documentation:
https://documentation.commvault.com/2022e/essential/101881_set_cvclient.html

There is no error, but nothing is changing:

errorCode entity                                                             
--------- ------                                                             
        0 @{clientId=925; clientName=OldClientname; instanceId=160; _type_=3}


I have seen, that there is also an open issue at github for this:
https://github.com/Commvault/CVPowershellSDK/issues/30

When I try the WhatIf flag I get the same error as shown at github
INFO: Set-CVClient: set client properties request failed for group [clientname]"

Is it working for someone or is someone working on that issue?

Thank you

icon

Best answer by NVFD411 1 March 2023, 16:55

View original

2 replies

Badge +1

@NVFD411 Thank you for your answer. To change the display name was my plan.

Your example is working.

Userlevel 2
Badge +7

@DoRay - Based on the details in github it appears that the client name change is not support. Although, you do have the ability to change the display name using the following example. I’ll follow up internally to validate and request documentation change if client name change is not supported.

 

.EXAMPLE
$clientProps = Get-CVClient -Name 'carbonwincs1' -AllProperties
PS C:\>$clientProps.client.displayName='carbonwincs1-1'
PS C:\>$clientProps.client.clientDescription = 'carbonwincs1-1 description modified with REST API Post request'
PS C:\>$clientProps | Set-CVClient -Name 'carbonwincs1' -Force

 

Reply