Notice how because of the spaces in the MSI name you need quotes around that path. So say $PSScriptRoot is C:\here, you want your final msiexec invocation to look like this: msiexec.exe /I ‘C:\here\Firefox Setup 73.0.1.msi’ /qn The other thing to be aware of is that you need to construct a PowerShell string that will present your desired argument string to the MSI. (It looks like you’re already following the advice here, but other readers might be interested) Kevin Marquette has a great blog post on running MSIs in PowerShell which I highly recommend.
NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions. Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft.
Submission Guidelines | Link Flair - How To