Silent Install Clone Agent

Purpose

This article will explain how to download the SQL Clone Agent service silently over the network.

Steps

You can use the following PowerShell commands, configured as necessary to achieve this.

$username = "<username that can access SQL Clone Server>"
$plaintextPassword = "<password for that user>"
$agentInstaller = "<some path>\SQLCloneSingleUserInstaller.exe"
$password = ConvertTo-SecureString $plaintextPassword -AsPlainText -Force
$credentials = New-Object System.Management.Automation.PSCredential ($username, $password)
Invoke-WebRequest -Uri "http://<server machine>:14145/api/installer" -OutFile $agentInstaller -Credential $credentials

You can then use 

$process = Start-Process -FilePath "$AgentInstallerPath" -ArgumentList ("-s", "SERVICEUSERNAME=$Username", "SERVICEPASSWORD=$Password") -Wait -PassThru

To run this which allows you to check $process.ExitCode to see if it succeeded.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request