Solved

Commvault and Powershell scripts executed remotely

  • 2 July 2021
  • 3 replies
  • 1719 views

Userlevel 4
Badge +13

Hi there,

My colleague is facing the following issue. He wants to monitor Commvault using scripts. With my help he has installed powershell modul into Commvault. Then, we have executed the script from the Windows server (locally) and everything works well. However, we are not able to execute powershell script remotely - from the diferrent machine than Commvault is running. Once he executes scripts from Zabbix server (remotely) the following errors appear:


ValidateResponse :
Status:
Message: The response content cannot be parsed because the Internet Explorer engine is not available, or Internet
Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
ErrorMessage:
RecommendedAction:
At C:\Program Files\WindowsPowerShell\Modules\Commvault.RESTSess ion\2.0.21\Commvault.RESTSession.psm1:560 char:13
+ ValidateResponse $response $output $ValidateProperty
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
+ CategoryInfo : NotSpecified: (

​ [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException, ValidateResponse

Get-CVSessionDetail : Invalid CommServe session token: Please login to CommServe with Connect-CVServer
At C:\Program Files\WindowsPowerShell\Modules\Commvault.JobManag er\2.0.9\Commvault.JobManager.psm1:131 char:31
+ ... $sessionObj = Get-CVSessionDetail $MyInvocation.MyCommand.Name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (

​ [Get-CVSessionDetail], Exception
+ FullyQualifiedErrorId : CVPS_ERROR_ID.1002,Get-CVSessionDetail


The following forums were being checked

https://www.zabbix.com/forum/zabbix-help/386126-userparameter-with-powershell-script-not-returning-a-value
https://www.zabbix.com/forum/zabbix-help/422537-zabbix-5-0-and-internet-explorer
https://www.zabbix.com/forum/zabbix-help/26591-remote-commands-on-windows

The zabbix script used: system.run[powershell.exe -NoLogo -NonInteractive -File "C:\Program Files\Zabbix Agent 2\Z-Agent-script\Job2.ps1"]
 

 

To sum up, if we run script locally on Windows with Commvault installed all is fine. However, executing script remotely makes troubles. It seems, that error output is pointing to powershell module…

 

Do you have any ideas or hints for solving the issue?

icon

Best answer by drPhil 12 July 2021, 13:10

View original

3 replies

Badge

Hello, drPhil,

Unfortunately we do not troubleshoot the scrips themselves but from your error “The response content cannot be parsed because the Internet Explorer engine is not available, or Internet
Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
”, it looks like it is arguing that there is an issue with Internet Explorer. 

I did a quick search and I saw two things that you can try:

• On the machine that you are trying to run the script against, has Internet Explorer ever been launched and if so, was the setup for Internet Explorer click through ever completed?:
 

 

• Have you tried to run the script with the -UsePasicParsing parameter?

 

Not 100% sure that the above will address your issue but I would definitely check the above to rule out issues with Internet Explorer.

Userlevel 5
Badge +8

Hey drPhil, 

You might be able to use PSTools to run the script as if it was locally. 

 

Userlevel 4
Badge +13

Hi @Blaine Williams , @Kirk! My colleague has solved the issue. The key thing to enable remote commands in Powershell is to change settings in powershell cmd and type - "Enable-PSRemoting" and moreover, the user/system account, that triggers the script, has to have sufficient rights. It helps to solve the issue and prevent previously mentioned error outputs.

Reply