Run "msiexec /?". That will show you the command line switches. Add logging such as "/l c:\Users\SPDF.log". Review the log with the software vendor.
powershell remotely install msi failed when no user logged in
Invoke-Command -ScriptBlock {msiexec.exe /i C:\Users\printer_SPDF_pullprint20221122\setup.msi} -ComputerName MCSVDI049
When i logged administrator,it will success at once
2 additional answers
Sort by: Most helpful
-
Amit Singh 5,071 Reputation points
2022-11-29T10:51:11.667+00:00 Check this similar thread for help - https://stackoverflow.com/questions/67024825/powershell-remoting-not-installing-msi
-
Limitless Technology 44,526 Reputation points
2022-11-30T14:35:38.8+00:00 Hi,
Thank you for posting your query.
Kindly follow the steps provided below to resolve your issue.
Solved with the aid of a reply on another forum - thanks mklement0
Just wrap the Start-Process in brackets and add .ExitCode and it works fine e.g.
$Result = Invoke-Command -computername MYREMOTEPC -ScriptBlock {(Start-Process "msiexec" -ArgumentList "/i C:\tmp\MYSOFTWARE.msi /quiet /norestart" -Wait -Passthru).ExitCode}
Go to this link for your reference and other troubleshooting procedures https://learn.microsoft.com/answers/questions/227975/getting-msi-exit-code-when-installing-remotely-usi.html
Do not hesitate to message us if you need further assistance.
--------------------------------------------------------------------------------------------------------------------------------
If the answer is helpful kindly click "Accept as Answer" and up vote it.