Question

powershell api - getting data not working - etc get-cvsqlinstance data

  • 17 February 2023
  • 5 replies
  • 193 views

Badge +1

Hello All,

i’m facing a issue where commands like get-cvsqlinstance -name “xxxx\xxx” is not working. Going through documentation from CV describes that i’m doing the correct thing.

although still getting internal error 500

powershell error :

ValidateResponse : 
Status: ProtocolError
Message: The remote server returned an error: (500) Internal Server Error.
ErrorMessage: 
RecommendedAction: 
At C:\Users\nnit-ceen.BCK\Desktop\CVPowershellSDK-master\CVPowershellSDK-master\Modules\Commvault.RESTSession\Commvault.RESTSession.psm1:410 char:17
+                 ValidateResponse $response $output $ValidateProperty
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ValidateResponse

 

any clue the above?


5 replies

Userlevel 6
Badge +14

Hi @Claes ,

I had the same issue, did you reinstall the Commvault Powershell module?

https://documentation.commvault.com/2022e/essential/124529_installing_commvault_powershell_sdk_from_github_most_recent_version_of_module.html

 

 

Best Regards,

Sebastien

Badge +1

Hi @Claes ,

I had the same issue, did you reinstall the Commvault Powershell module?

https://documentation.commvault.com/2022e/essential/124529_installing_commvault_powershell_sdk_from_github_most_recent_version_of_module.html

 

 

Best Regards,

Sebastien

i downloaded the powershell package from: https://github.com/Commvault/CVPowershellSDK

ran the offline install method, and made the following ps script

 

$commServer = "server"
$commUsername = "user"
$commPassword = ConvertTo-SecureString "password" -AsPlainText -Force
Connect-CVServer -Server $commServer -User $commUsername -Password $commPassword

Get-CVSQLInstance -ClientName "client-server\i01"

Disconnect-CVServer

and this is giving the above error before…. regardless of what sql server instance i give.

Userlevel 6
Badge +14

And typing command Get-CVSQLInstance -ClientName "client-server” doesn’t work?

Badge +1

And typing command Get-CVSQLInstance -ClientName "client-server” doesn’t work?

nope :(

 

PS C:\Users\ceen\Desktop\CVPowershellSDK-master\CVPowershellSDK-master> Get-CVSQLInstance -clientname "client-server"
ValidateResponse :
Status: ProtocolError
Message: The remote server returned an error: (500) Internal Server Error.
ErrorMessage:
RecommendedAction:
At C:\Users\nnit-ceen.BCK\Desktop\CVPowershellSDK-master\CVPowershellSDK-master\Modules\Commvault.RESTSession\Commvault.RESTSession.psm1:410 char:17
+                 ValidateResponse $response $output $ValidateProperty
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ValidateResponse

INFO: Get-CVSQLInstance: no SQL instances found for client [client-server]


and i know this is not true about sql instances not found… i have around 1000 sql serves, some of them contain multiple sql instances…. so far im getting error on all of the servers i have tried..

Userlevel 6
Badge +14

Strange, you also tried from a remote server, like your laptop or Media Agent?

Reply