You can deploy software packages to Windows computers using PowerShell, Group Policy, PDQ Connect, or PDQ Deploy. The best method depends on whether you manage local or remote devices. Here’s how each option works.
How do you deploy software with PowerShell?
You can deploy software packages with PowerShell by copying an MSI installer to target devices and running it silently with msiexec. Here’s an example script:
#Only works with MSI and only one installer in the source folder at a time
#Add computer targets ("computer1", "computer2", etc...)
$computers = "<computer1>", "<computer2>"
#Path to your installer share driver
$installer = Get-ChildItem \\<server_name>\<installer_share_drive>
#Installer destination path
$tempPath = "C$\Temp"
#Start foreach loop
foreach ($computer in $computers) {
#Test if the installer destination path exists; if not, create it
If(!(Test-Path "\\$computer\$tempPath")){
New-Item -ItemType Directory -Force -Path "\\$computer\C$\Temp"
}
#Copy the installer to destination
Copy-Item -Path $installer -Destination "\\$computer\$tempPath" -Force
#Run copied MSI silently on target PC
Invoke-Command –ComputerName $computer –ScriptBlock {msiexec.exe /i "C:\Temp\$($using:installer.Name)" /qn}
}
This script copies an MSI installer from a network share to the targeted computers, then runs it silently. You can expand it to target devices from a CSV or run multiple MSIs with additional loops.
Remember: When executing PowerShell against devices other than your local computer, you may need to enable Windows Remote Management (WinRM) for it to work. In this example, you also need a network share with the proper permissions to ensure that the installer files can be copied to target devices.
How do you deploy packages using Group Policy?
Group Policy can install MSI packages across an Active Directory domain. It works best for on-prem devices. Here’s how:
Create a network share containing your MSI installer files.
Open Group Policy Management.
Right-click on the domain or OU you want the Group Policy Object (GPO) applied to, then click Create a GPO in this domain, and Link it here.
Enter a name for the GPO, then click OK.
Right-click on the newly created GPO, then click Edit.
Go to Computer Configuration > Policies > Software Settings > Software installation.
Click Action > New > Package.
Navigate to the network share that contains the install files, select the MSI files you want to deploy, and click Open.
Select Assigned and click OK for both packages.
Once you apply the policies and restart the selected computers, the applications attached to this policy will install. Group Policy is a great way to deploy packages because it provides granular security access control, and most organizations already use it.
Remember: Ensure your permissions are configured correctly so the appropriate users and devices can access the share.
What is the best way to deploy packages to remote computers? (PDQ Connect)
PDQ Connect is the easiest way to deploy software to remote Windows computers. It uses an agent-based system with a web interface and over 100 prebuilt packages. You can deploy in three steps:
In PDQ Connect, click Packages.
Select the package, then click Deploy.
Enter device or group names, then click Deploy again.
All you need is an internet connection. PDQ Connect also supports custom packages and dynamic device groups.
Automate your patching
Keep Windows devices patched and secure from the cloud.
What is the best way to deploy packages to local computers? (PDQ Deploy & Inventory)
PDQ Deploy & Inventory is the easiest way to deploy software to local computers. With over 200 prebuilt packages, most apps install in minutes. Here’s how:
This example uses a prebuilt package and collection in PDQ Deploy & Inventory. Check out our guide on creating custom packages and building custom collections if you need help building your own packages and collections.
In PDQ Deploy, click on Package Library.
Select the package you want to deploy, then click Download Selected (As Auto Download).
Right-click the package, then select Deploy Once.
Click Choose Targets > PDQ Inventory > Collection.
Filter your search by entering the application name in the search field, then select the collection you want to target.
The computers in the collection are automatically added to the target list for your deployment. Review the targets, then click Deploy Now.
In a few minutes, the package will be deployed to the targeted devices.
If you want to get really l̶a̶z̶y̶ fancy, you can even automate your deployments to keep applications updated without manual work.
Which software deployment method should you use?
Choose the method that fits your environment:
PowerShell or Group Policy for on-prem scripting and domain installs.
PDQ Connect for remote devices.
PDQ Deploy & Inventory for local endpoints.
With so many ways to deploy software, the best method depends on your needs (and ensures you never have to leave your office chair). Remember the first rule of IT: Automate everything, socialize never.
Trial PDQ Connect or PDQ Deploy free for 14 days to see which works best for your unique environment.
Deploying software packages FAQs
What is Group Policy?
Group Policy is a Windows management tool that can deploy software across an Active Directory domain.
How does Group Policy work for software installation?
It supports MSI files only, allowing administrators to automatically install or publish applications for users or computers. The process involves creating a Group Policy Object (GPO), linking it to the desired OU, and specifying whether the software is Assigned (mandatory) or Published (optional). The MSI file must be stored in a network-accessible location for deployment.
What is msiexec?
msiexec
is the Windows Installer command-line tool used to install, modify, or remove MSI-based software packages. When deploying software with PowerShell or scripts, msiexec /i
installs the package, and msiexec /qn
runs it silently without user interaction.