Skip to main content
Solved

Change CVClientName with Powershell API


Forum|alt.badge.img+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

Best answer by NVFD411

@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

 

View original
Did this answer your question?

2 replies

Forum|alt.badge.img+7
  • Vaulter
  • 62 replies
  • Answer
  • March 1, 2023

@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

 


Forum|alt.badge.img+1
  • Author
  • Byte
  • 1 reply
  • March 2, 2023

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

Your example is working.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings