How to Use Winget to Install and Update Software Remotely

How to Get Device Warranty Info Remotely Blog Banner

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 how to use winget, what it is, and how it works.

Too many tools in too many places?
See how tool sprawl impacts IT and what you can do to solve 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/

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).