Just as Node.js project developers have a package repository with code snippets such as NPM, and .NET developers have NuGet, PowerShell modules and script developers have the PowerShell Gallery, a managed service by Microsoft in which, according to its website.
“You will find useful modules that contain PowerShell commands and Desired State Configuration (DSC) resources. You will also find scripts (some of which may contain PowerShell workflows), which describe a set of tasks and provide sequencing of those tasks chores”.
The PowerShell Gallery currently has 66,367 packages, of which almost 3,200 million downloads have already been made. Some of the packages have been developed by Microsoft itself, but many others are created by the PowerShell community itself.
To get an idea of the type of utilities it offers, the most popular packages in the repository include the following:
- NetworkingDsc: DSC resources to configure aspects related to networks.
- PSWindowsUpdate: This module contains ‘cmdlets’ to manage the Windows Update client.
- Az.Accounts: Module with ‘cmdlets’ to manage user accounts in Azure Resource Manager.
- PackageManagement: A package manager for accessing software over the Internet.
- Computer ManagementDsc: DSC resources related to aspects of computer administration such as task scheduling, virtual memory management or power settings, etc.
Despite being focused mainly on the Windows world, PowerShell and its gallery can also be used on Linux.
A basic look at how to use it
Thanks to the PowerShellGet module, any PowerShell user can use the gallery to upload, detect, and download all kinds of packages. Before updating it, we must install the most recent version of the aforementioned NuGet, using the following command:
Install-PackageProvider -Name NuGet -Force
Otherwise, when we try to use it, PowerShell will offer to install it. This is what happens if we try to do a search for modules related to Active Directory in the gallery (using the command 'Find-Module *activedirectory*'
) without having previously installed it:

Once installed, we can already carry out the corresponding search:

And when we know which module we want to install on our computer, just run Install-Module. Example:
Install-Module -Name PowerShellGet
If, on the other hand, we want to install a script, we must use the ‘ Install-Script ‘ command, also followed by its name in the PowerShell Gallery.
Of course, as with other similar package managers, modules and scripts can be updated with more modern versions. For this we will have the ‘ Update-Module ‘ or ‘ Update-Script ‘ commands .
And finally, we can do a check of what we have installed in the past from the PowerShell Gallery, with the commands ‘ Get-InstalledModule ‘ and ‘ Get-InstalledScript.
In Technoeager | Why there is default drive letter C on Windows and not A or B