Hi, guys. I am working on a script to install a locally produced .msi on a number of workstations remotely. I have the .msi copied to the C:\Temp directory on all machines. Below is the code that I was trying to use but things just are working out. I'd really appreciate any advice on this.
$blades = Get-Content 'C:\Temp\computers.txt'
foreach ($blade in $blades)
{
Invoke-Command -ComputerName $blade -Verbose -ScriptBlock {msiexec.exe /i C:\Temp\PDS-M.msi /quiet TARGETDIR=%SYSTEMDRIVE% ROOTDRIVE=%SYSTEMDRIVE% ADDLOCAL=ALL ALLUSERS=TRUE}
}