Question

Change hostname using Set-CVClient seems not to work

  • 13 November 2023
  • 1 reply
  • 88 views

Badge +1

Friends,

 

Version 11.28.89

 

I need to update the hostname on a bunch of clients, so I try to do this via Set-CVClient as described here: https://documentation.commvault.com/v11/essential/101881_set_cvclient.html

 

But eventhough I receive errorCode 0, it seems that nothing is done. Can anyone tell me what is going wrong?

 

Thanks in advance,

Maurice van ‘t Loo 

 

PS C:\test> $clientprops = Get-CVClient -Name TESTSERVER_INST01_AGClient
PS C:\test> $clientprops

Name                           Value
----                           -----
clientId                       5193
type                           3
clienthostName                 TESTSERVER_INST01_AGClient
clientName                     TESTSERVER_INST01_AGClient
cvdPort                        0
clientIdGUID                   B07D5C10-663B-41D4-8B81-A9CC77087D63


PS C:\test> $clientprops.clienthostName = 'TESTSERVER.domain.nl'
PS C:\test> $clientprops

Name                           Value
----                           -----
clientId                       5193
type                           3
clienthostName                 TESTSERVER.domain.nl
clientName                     TESTSERVER_INST01_AGClient
cvdPort                        0
clientIdGUID                   B07D5C10-663B-41D4-8B81-A9CC77087D63


PS C:\test> $clientprops | Set-CVClient -Name TESTSERVER_INST01_AGClient -Confirm

Confirm
Are you sure you want to perform this action?
Performing the operation "Set-CVClient" on target "TESTSERVER_INST01_AGClient".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

processinginstructioninfo     response
-------------------------     --------
@{attributes=System.Object[]} {@{errorCode=0; entity=}}


PS C:\test> $clientprops = Get-CVClient -Name TESTSERVER_INST01_AGClient
PS C:\test> $clientprops

Name                           Value
----                           -----
clientId                       5193
type                           3
clienthostName                 TESTSERVER_INST01_AGClient
clientName                     TESTSERVER_INST01_AGClient
cvdPort                        0
clientIdGUID                   B07D5C10-663B-41D4-8B81-A9CC77087D63

 


1 reply

Badge +1

Also tried via Rest API, according to this: https://api.commvault.com/#b6d8a08a-2aed-4aa8-b134-7ee5027f1570
 

$body = @"
{
"clientProperties": {
"client": {
"clientEntity": {
"hostname": "TESTSERVER.domain.nl"
}
}
}
}
"@

POST to “webconsole/api/Client/5193” doesn’t do anything except returning a returncode telling that everything went fine….

 

I use GET/POST/DELETE in other scripts, so I know that API works, but just to update the hostname seems a problem.

Reply