- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to install the MSI file using PowerShell?
To install the MSI file with PowerShell, we can use cmdlet Start-Process.
Let say we want to install the 7ZIP MSI file on the local computer and we have downloaded and stored the source file on the C:\temp location. Once we run the below command it will start the MSI installation.
Start-Process C:\Temp\7z1900-x64.msi
The above command will open the GUI to install the MSI file but we use PowerShell to avoid GUI interaction so we can add the argument to install the file.
If you check which arguments are available to run the MSI file, use the below command.
C:\Temp\7z1900-x64.msi /?
It will popup box like this,
We need here /quiet argument to install the 7zip silently.
Start-Process C:\Temp\7z1900-x64.msi -ArgumentList "/quiet"
If you want to see the progress bar in unattended mode add /Passive argument
Start-Process C:\Temp\7z1900-x64.msi -ArgumentList "/quiet /passive"
To install the MSI file on the remote server, we can use Invoke-Command.
Invoke-Command -ComputerName LabMachine2k16 -ScriptBlock{ Start-Process C:\Temp\7z1900-x64.msi -ArgumentList "/quiet" }
- Related Articles
- How to install MSI file using batch file in PowerShell?
- How to install MSI file to the custom directory using PowerShell?
- How to install the MSI package using PowerShell DSC?
- How to uninstall the MSI package using PowerShell?
- How to retrieve the MSI package product code using PowerShell?
- How to install the Nuget Package using PowerShell?
- How to install DSC resources using PowerShell?
- How to Install the Azure CLI on Windows using PowerShell?
- How to install a certificate to the certificate store using PowerShell?
- How to edit the CSV file using PowerShell?
- How to search in the file using PowerShell?
- How to mount the ISO file using PowerShell?
- How to dismount the ISO file using PowerShell?
- How to get the file extension using PowerShell?
- How to convert JSON file to CSV file using PowerShell?
