How to deploy a package to computers

Brock Bingham candid headshot
Brock Bingham|July 6, 2023
Dog drooling while reading content on laptop
Dog drooling while reading content on laptop

Installing software is a time-honored tradition among IT folks. And with so many ways to deploy packages to computers, there's no wrong way to get the job done — unless you're installing software in person. That would be a direct violation of rule one of the sysadmin handbook, which clearly states, "Avoid social interaction whenever possible." With that out of the way, let's compare several different methods to deploy packages to your devices.

How to deploy software with PowerShell

It should come as no surprise that you can deploy packages to computers using PowerShell. My motto for PowerShell is: "If there's a will, there's a way — with PowerShell." While it may not be the quickest or easiest method, it's one of the more flexible ways to deploy packages to your endpoints.

Let's look at an example script that we can use to deploy an application to other computers on our network. Remember that 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.

Here's the 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 simply copies an .MSI installer from a network share to the targeted computers. It then runs the installer silently using msiexec.

If you want to target a lot of devices, this script can be modified to target devices from a text or .CSV file. It can also handle multiple .MSI files simultaneously with an additional foreach loop. The great thing about PowerShell is that you can modify scripts to meet your needs, making it highly customizable.

How to deploy packages using Group Policy

Group Policy is a robust Windows management infrastructure that’s used to configure settings and preferences for users and computers in an Active Directory domain. Group Policy's many functions include the ability to deploy software. Here's how to install applications using Group Policy (keep in mind that this process only applies to .MSI files).

  1. Create a network share containing your .MSI installer files. Ensure your permissions are configured correctly so the appropriate users and devices can access the share.

  2. Open Group Policy Management.

  3. 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.

    Create the GPO.

  4. Enter a name for the GPO, then click OK.

  5. Right-click on the newly created GPO, then click Edit.

  6. Navigate to Computer Configuration > Policies > Software Settings > Software installation.

    Navigate to the Software installation policy.

  7. Click Action > New > Package.

  8. Navigate to the network share that contains the install files, select the .MSI files you want to deploy, and click Open.

    Select the installation files.

  9. Select Assigned and click OK for both packages.

    The GPO with the assigned installers.

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.

The best way to deploy a package to local computers

If you're looking for the fastest and easiest way to deploy software to local computers, PDQ Deploy & Inventory is the solution for you. Deploy & Inventory take all the guesswork out of package deployments. With over 200 prebuilt packages in the Package Library, many of today's most popular applications are ready to be deployed with just a few clicks. Here's how easy it is to deploy a package with Deploy & Inventory.

This example uses a prebuilt package and collection in Deploy & Inventory. Check out our guide on creating custom packages and building custom collections if you need help building your own packages and collections.

  1. In PDQ Deploy, click on Package Library.

  2. Select the package you want to deploy, then click Download Selected (As Auto Download). I'll use Dropbox for this example.

    Download the package from the Package Library.

  3. Once the package downloads, right-click to select the package, then click Deploy Once.

    Launch the Deploy Once menu.

  4. Click Choose Targets > PDQ Inventory > Collection.

  5. Filter your search by entering the application name in the search field, then select the collection you want to target.

    Select the target collection.

  6. The computers in the collection are automatically added to the target list for your deployment. Review the targets, then click Deploy Now.

    Deploy the package to the targets.

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 so all of your applications and devices stay updated automatically.

The best way to deploy packages to remote computers

If you manage remote devices, you need a remote solution. PDQ Connect is an agent-based system with a web interface that simplifies remote endpoint deployments and management. And it comes with over 100 prebuilt packages, with new packages being added all the time. Here's how easy it is to deploy a package with PDQ Connect.

  1. In PDQ Connect, click Packages.

  2. Select the package you want to deploy, then click Deploy.

    Select the package and then click Deploy.

  3. Enter the names of the devices or groups you want to target, then click Deploy.

    Select the targets then deploy the package.

With PDQ Connect, you can deploy a package to remote computers in three easy steps — all you need is an internet connection. PDQ Connect also allows you to create custom packages and group filtering, giving you the flexibility and functionality you need to manage your remote devices.

Which deployment method is right for you?

With so many ways to deploy a package to a computer, the best solution comes down to what works best for you and your organization — as long as the solution doesn't involve getting out of your comfy office chair and *shudders* socializing.

To see if PDQ Deploy & Inventory are a good fit for your organization, you can try them both for free with no locked functionality. If you manage remote devices, PDQ Connect will be your new best friend. Trial Connect for free and get in touch with those remote devices — wherever they may be. Both trials are available for 14 days.

Brock Bingham candid headshot
Brock Bingham

Born in the '80s and raised by his NES, Brock quickly fell in love with everything tech. With over 15 years of IT experience, Brock now enjoys the life of luxury as a renowned tech blogger and receiver of many Dundie Awards. In his free time, Brock enjoys adventuring with his wife, kids, and dogs, while dreaming of retirement.

Related articles