mpeytonfan18
mpeytonfan18

Reputation: 109

PowerShell Script - ServiceURL parameter

I am trying to write a powershell script to install an MSI file with a few parameters. I was told the MSI file needs the following parameters: /qn SERVICE_URL="https://.....com/InstallerServer" SSL="1"

I took a stab at it, but it failed. Can someone offer some advice?

This is what I tried:

Execute-MSI -Action Install –Path 'InstallerService.msi'-Parameters "/QN /SERVICE_URL=https://…..com/InstallerServer /SSL=1"

Upvotes: 0

Views: 70

Answers (1)

Guenther Schmitz
Guenther Schmitz

Reputation: 1999

The variable $Installer takes the full path to the msi and $Arguments - well - your arguments

$Installer = 'C:\install\InstallerService.msi'
$Arguments = '/qn SERVICE_URL="https://.....com/InstallerServer" SSL="1"'
Start-Process -FilePath $Installer -ArgumentList $Arguments

you could add the switch -Wait to not just start the process but wait until it's completed (if you want to perform further actions after its execution) like so:

Start-Process -FilePath $Installer -ArgumentList $Arguments -Wait

Upvotes: 1

Related Questions