Problem:
I am writing a script for PowerShell but I am running into an error when trying to install the collector from the CLI. I am issuing this command:
C:\Deployment\Installers\SumoCollector.exe -q -console -Vsumo.accessid=xxxxxxxxxxxx -Vsumo.accesskey=xxxxxxxxxxxxxxxxxxxxx -Vcollector.name="$TAG_VALUE - $INSTANCE_ID"
I have tried using quotes around the access key. I keep getting this error:
Missing credentials in quiet mode installation. Please reinstall with credentials
Resolution:
Here are a couple of sample windows CLI commands that will ensure that the collector installer executable gets passed the arguments supplied within a PowerShell script. Be sure to customize the command to your specific use case:
Solution A:
Utilize the PowerShell command "Start-Process" to execute the command
Start-Process "C:\Deployment\Installers\SumoCollector.exe" "-console -q -Vsumo.accessid=<id> -Vsumo.accesskey=<key>" -Vcollector.name="$TAG_VALUE - $INSTANCE_ID" -Wait
Solution B:
Call the "cmd.exe" to execute the cli command
cmd.exe /C '"C:\Deployment\Installers\SumoCollector.exe" -console -q -Vsumo.accessid=<id> -Vsumo.accesskey=<key> -Vcollector.name="$TAG_VALUE - $INSTANCE_ID"'
Comments
0 comments
Please sign in to leave a comment.