Commvault / CVPowershellSDK

Developer SDK - Powershell
12 stars 12 forks source link

Connect-CVServer returning protocol error #31

Closed pax212fr closed 2 years ago

pax212fr commented 2 years ago

Hi All,

I'm trying to connect to commserve using connect-cvserver (Connect-CVServer -Server cv-srv01 -Port 81 -User xxx -Password $password but it says : ValidateResponse : Status: ProtocolError Message: The remote server returned an error: (404) Not found. ErrorMessage: RecommendedAction: Au caractère C:\Program Files\WindowsPowerShell\Modules\Commvault.RESTSession\2.0.21\Commvault.RESTSession.psm1:560 : 13

Of course I can connect using the url and it connects fine, any idea ? thx for your help.

JnaneshD05 commented 2 years ago

Will check this and get back.

pax212fr commented 2 years ago

Did it, got another msg :

PS C:\WINDOWS\system32> Enter-pssession cv-srv01 Connect-CVServer -Credential $Credential -Server cv-srv01 ValidateResponse : Status: ProtocolError Message: Le serveur distant a retourné une erreur : (404) Introuvable. ErrorMessage: RecommendedAction: Au caractère C:\PowerShell\CVPowershellSDK-master\Modules\Commvault.RESTSession\Commvault.RESTSession.psm1:560 : 13

I don't know what i'm doing wrong...thx for your help

Cordialement,

Bonne journée !

De : medrazd @.> Envoyé : mardi 11 janvier 2022 15:56 À : Commvault/CVPowershellSDK @.> Cc : pax212fr @.>; Author @.> Objet : Re: [Commvault/CVPowershellSDK] Connect-CVServer returning protocol error (Issue #31)

You need to enable remote commands in powershell. To do this try Enable-PSRemoting

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCommvault%2FCVPowershellSDK%2Fissues%2F31%23issuecomment-1010043387&data=04%7C01%7C%7C4a77aa0b60f143b8e68b08d9d51282c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775097740688349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7n5os%2Fu%2FYQ5kbzXVZ%2BTXseBSpVmMI59pcz8GbgPwSSw%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAWZKLX4PNMKBPRAIJTHIHL3UVRAIXANCNFSM5JNKZDPQ&data=04%7C01%7C%7C4a77aa0b60f143b8e68b08d9d51282c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775097740688349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6Vh%2F%2BbqI5oIq%2FpW9Uzbazlf6xpqLBPPmEImB5ygcmJ8%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C4a77aa0b60f143b8e68b08d9d51282c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775097740688349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=F20BYQzj1pfjeE4p9otgwo9jBbFJbfG1nKJqzMfC5Jo%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C4a77aa0b60f143b8e68b08d9d51282c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775097740688349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BEreaVG8LZnDJm1nPH8KlHOJUQxumKH6IOT4O7tn8YE%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

pax212fr commented 2 years ago

Thx a lot, the error msg has changed :

PS C:\WINDOWS\system32> Connect-CVServer -Server cv-srv01 -Port 81 -User $User -Password $password

Connect-CVServer : Impossible de traiter la transformation d'argument sur le paramètre «Password». Impossible de convertir la valeur «P$ssw0rd» du type «System.String» en type «System.Security.SecureString». Au caractère Ligne:1 : 86

It Says something like : Unable to process argument transformation on parameter 'Password'. Unable to convert value "P$ssw0rd"

Thx for your help

JnaneshD05 commented 2 years ago

Hi, Please try to use the Connect-CVServer without -Password parameter and provide the password in secure string.