Install Software Using PowerShell Script
PowerShell is a Windows utility to perform automation and administration-related tasks. All operations are possible in PowerShell, from managing system files to installing software. In fact, PowerShell can perform such tasks which cannot be performed using a standard UI interface. Moreover, both “PowerShell” commands and “PowerShell ISE” scripts can be utilized for installing software.
This tutorial will help the users to install software using the PowerShell script.
Mục lục bài viết
How to Install Software Using PowerShell Script?
PowerShell script can be used to install the software in the given forms:
Method 1: Perform Standard Installation of Software Using PowerShell Script
Let’s start with the standard installation of the software using PowerShell script. Standard installation is the simple installation of the software.
For instance, overview the mentioned example:
>
Start-Process C:\New\7zip.msi
According to the above command:
- First of all, use the “Start-Process” command to perform one or more installations.
- After that, specify the software path that needs to be executed:
As you can see from the output, the installer setup of “7-zip” has been launched.
Method 2: Perform Silent Installation of Software Using PowerShell Script
Software installation can be performed silently by using the below command in the PowerShell script:
>
Start-Process C:\Doc\WinRAR.exe
-ArgumentList
“/S /v/qn”
Here:
- First of all, add the “Start-Process” command and then specify the software file path.
- After that, add the “-ArgumentList” parameter and then assign “/S /v/qn” options to install the specified software in silent mode:
Executing the above code will install the software silently using a PowerShell script.
Conclusion
To install the software using PowerShell, first add the “Start-Process” command, add the software file path, and then execute it for standard installation. In case, if you want to install the software silently, then add the “/S /v/qn” parameter. This post has provided various ways to install software using PowerShell script.