Installing and Uninstalling an MSI using PowerShell

This blog post shows code that can be used when installing and uninstalling an MSI using PowerShell. You can adapt the code to add more parameters (public properties etc) as necessary.

You can use this chunk of PowerShell code to install or uninstall an MSI:

$MSIArguments = @(
"/i"
"`"C:\path with spaces\alkane.msi`""
"/qb"
"/norestart"
"/l*v"
"`"C:\path with spaces\alkane.log`""
)
Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow