Ninja Quick Guides: How to Use Winget to Install and Update Software Remotely

5 Bite-Sized Ways to Improve Your Business Every Week

NinjaOne Newsletter

Join fellow growth-minded MSPs and feed your business with new tips and tutorials delivered straight to your inbox.

Don't miss any promotions, free tools, events & webinars and product updates. Subscribe to receive the NinjaOne Newsletter.

Grow faster. Stress less.

Visit our Resources Center for more MSP content.
Brittany Brown      

Whether your organization has a few remote employees or your entire workforce has gone remote, you need an easy way to install and update software remotely. By using a tool called winget, you can natively deploy software through Windows. In this article, we’ll take a look at what winget is, how it works, and how you can use it

What is Winget?

Winget is Windows’ native package management solution. A package management solution allows you to manage applications including: installing applications, collecting information about installed applications, and upgrading or patching applications.

Prior to winget, which was first introduced in Windows 10, Windows did not have a native package management solution. This means that teams either needed to rely on a third-party application (like Chocolatey, Ninite, and PatchMyPC) or update software on endpoints manually.

How To Use Winget

Winget is accessible via the command line or PowerShell terminals on Windows; it does not have a GUI.

Winget has the following commands:

  • Primary action commands
    • Install: Installs the target package
    • Uninstall: Uninstalls the target package
    • Upgrade: Installs the latest available version of a previously installed package
  • Secondary action commands
    • Import: Installs all the packages listed in a file
    • Export: Exports a list of installed packages
  • Informational commands
    • Show: Shows information about a package
    • Source: Allows you to manage the source of packages
    • Search: Returns basic information about searched for packages
    • List: Lists all installed packages
    • Validate: Validates a manifest file
    • Settings: Gives access to winget settings
    • Features: Shows the status of experimental features in winget

How to Use Winget Functions

Winget uses standard PowerShell/CLI syntax using the commands above. Here are a few examples of how you can utilize functions to achieve specific tasks:

  • To get a list of all packages on an endpoint, you would type ‘winget list’ into the PowerShell terminal
  • To search for packages containing ‘office,’ you would type ‘winget search *office*’
  • To patch an existing package named ‘notepad,’ you would type ‘winget upgrade notepad’

How to Use Winget at Scale

There are a lot of tools out there that will automate the software inventory capabilities of winget at scale, including NinjaOne. Unfortunately, application patching with winget is notoriously difficult. With NinjaOne, you can get automated patching for ~135 applications.

You can also leverage NinjaOne’s automation and remote script deployment capabilities to run winget install and upgrade commands on one or many endpoints simultaneously.

Let’s go through an example. Here’s how you can use winget to patch Adobe Acrobat utilizing NinjaOne’s automation capabilities:

  1. Use winget to get a list of the available software upgrades using the ‘winget upgrade’ command in PowerShell
    • Make note of the ID of the software you’d like to upgrade (i.e., Adobe.Acrobat.Reader.64-bit)
  2. Write a PowerShell script to upgrade Adobe Acrobat and upload it to NinjaOne (or use NinjaOne’s built-in IDE)
    > winget upgrade Adobe.Acrobat.Reader.64-bit

    Or, upgrade all applications using the ‘all’ command:

    > winget upgrade --all

    You can even upgrade any unknown applications on your network as well:

    > winget upgrade -–all –-include-unknown
  3. Create a dynamic group in NinjaOne that includes all endpoints with Adobe Acrobat installed
  4. Create a scheduled task that runs the above winget script against the Adobe Acrobat dynamic group daily

By combining the functionality of winget with the scalability and flexibility of NinjaOne, you can easily deploy and patch software remotely and support your remote workforce.

Discover more about NinjaOne and get your free trial here: https://www.ninjaone.com/

5 Bite-Sized Ways to Improve Your Business Every Week

NinjaOne Newsletter

Join fellow growth-minded MSPs and feed your business with new tips and tutorials delivered straight to your inbox.

Don't miss any promotions, free tools, events & webinars and product updates. Subscribe to receive the NinjaOne Newsletter.