Essential Guide

The go-to Windows PowerShell guide

A comprehensive collection of articles, videos and more, hand-picked by our editors
Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

How can you use PowerShell to enable automated software deployment?

The quest to keep up with constant changes to software is tough for IT admins, but they can make their lives easier by automating the deployment process using PowerShell.

Software vendors are constantly updating their products, making it nearly impossible to keep up without automated software deployment.

Deploying software to enterprise desktops without automation is like whack-a-mole. As soon as you do the research, create the package, distribute the software to desktops and get it installed, changes pop up and it's time to do it all again.

Luckily, deploying software to enterprise desktops is a standard process. You must package up the software, define the target group of machines to push the software to, distribute the software to the machines and install it without disrupting user workflows.

Tools such as Microsoft's System Center Configuration Manager, Symantec's Endpoint Management and Dell KACE can enable automated software deployments. These tools expedite the process but still leave gaps. Windows PowerShell, a command-line shell, can help fill in the gaps. In fact, small and medium-sized businesses might be able to exclusively use PowerShell to deploy software. PowerShell scripts for various deployment steps allow for complete flexibility in what, how and when you deploy software.

Larger organizations must keep in mind that deploying software with PowerShell is a very simple approach, however. Deploying software to thousands of enterprise desktops opens up a whole new suite of problems. Still, a PowerShell-only automated software deployment approach can provide some good examples of just what's possible to do with PowerShell.

Using PowerShell for automated software deployment

Deploying software to enterprise desktops is like whack-a-mole.

To get started you must figure out which software to deploy. Then build a small script to define each machine you want to distribute the software to. The script provides the launching pad for everything else. Here is an example script.

For example, if you want to deploy the Malwarebytes software package to a couple of desktops named MEMBERSRV1 and LABSQL, rename the script you downloaded to Deploy-Software.ps1 and run the script like this (Figure A):

& .\Deploy-Software.ps1 -Client 'MEMBERSRV1','LABSQL' -InstallerFilePath C:\Software\mbam-setup-2.2.0.1024.exe -Verbose

PowerShell script
Figure A. The PowerShell script at work

Now if you check each of the desktops, Malwarebytes should be installed (Figure B).

The software is installed
Figure B. Installation success

Better yet, you can verify you successfully installed the software using PowerShell as well (Figure C).

Using PowerShell to check the installation
Figure C. Check the installation in PowerShell itself

The next time you deploy a piece of software, think about your options. If you already use an expensive tool, by all means, continue to use it. Always know that PowerShell can fill in any holes the tool may have. And if you just need to do some ad hoc deployments to a few machines, your expensive tool may be overkill.

Next Steps

Using WMI and the CIM standard with PowerShell

How PowerShell fights security threats

Working with PowerShell cmdlets

This was last published in January 2017

PRO+

Content

Find more PRO+ content and other member only offers, here.

Essential Guide

The go-to Windows PowerShell guide

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What is your preferred method for deploying software to enterprise desktops?
Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close