AnsweredAssumed Answered

Installing the client with PowerShell (Invoke-Command)

Question asked by Javier Santiago on Nov 15, 2019
Latest reply on Nov 21, 2019 by Javier Santiago

Hi!

 

Seems that the agent does not like to work well with Invoke-Command:

 

$QBlock = {param ($QlXarg) & "$using:InstallFolder\QualysCloudAgent.exe" $QlXarg}

Invoke-command -Session $CSession -ScriptBlock $QBlock -ArgumentList " CustomerId={xxxxx-xxxx-xxxx-xxx-xxxxx} ActivationId={xxxxxx-xxx-xxx-xxxx-xxxxx}"

 

Does not work adding curly braces to the Arguments:

 

Invoke-command -Session $CSession -ScriptBlock $QBlock -ArgumentList ' CustomerId="{xxxxx-xxxx-xxxx-xxx-xxxxx}" ActivationId="{xxxxxx-xxx-xxx-xxxx-xxxxx}"'

 

The agent does start on the remote machine but does nothing.

 

Anyone had the same issue?.

 

Thanks!

Outcomes