Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / Managing PowerShell Modules in Windows: Install, Update & Remove

November 24, 2026

Managing PowerShell Modules in Windows: Install, Update & Remove

PowerShell modules are packaged collections of cmdlets that can be used to manage various Windows components, server roles, and cloud services. Modules are used to manage infrastructure and automate various tasks. The centralized PowerShell Gallery repository contains thousands of ready-to-use modules (from Microsoft as well as other vendors and independent developers) that can be downloaded and installed on computers. This article covers the basics of managing PowerShell modules in Windows, including managing PowerShell repositories and installing, updating, and removing PS modules.

Contents:
  • How to Manage PowerShell Repositories in Windows
  • Install PowerShell Modules in Windows From a Repository
  • How to Install PowerShell Modules Manually (Including Offline Installation)
  • Updating PowerShell Modules
  • Removing PowerShell Modules
  • Most Useful PowerShell Modules for SysAdmins

How to Manage PowerShell Repositories in Windows

By default, only a single official public Microsoft package repository, the PowerShell Gallery (PSGallery, https://www.powershellgallery.com/), is registered in all Windows OS versions.

To list all the registered repositories in Windows, run:

Get-PSRepository

Get-PSRepository - list registered repos

An administrator can add extra repositories, including private ones, or register a local repo stored in a directory on the local computer or in a shared network folder on the LAN (by its UNC path).

For example, to add a new PowerShell repository located in a shared folder:

Register-PSRepository -Name myCORPPSRepo -SourceLocation \\mun-man01\PSRepo -InstallationPolicy Trusted

To remove a registered repository:

Unregister-PSRepository myCORPPSRepo

Modules in PowerShell repositories are stored in the format of NuGet packages (with the .nupkg file extension).

The PSGallery repository is not trusted by default, so a warning will appear the first time you try to install any module from it.

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):

Untrusted repository warning Set-PSRepository

To mark a specific repository as trusted, run:

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

If you accidentally removed the default PSGallery repository from a computer, you can restore it using the following command:

Register-PSRepository -Default

Install PowerShell Modules in Windows From a Repository

To install a PowerShell module, specify its name. The PowerShell module installation command can be generated directly on the PowerShell Gallery website.

Find module on PowerShell Gallery (PSGallery) website

Or you can find the name of the required module by searching through the configured repositories. For example, let’s list all the PowerShell modules for managing BIOS settings from different vendors.

Find-Module *BIOS*

Find-Module - in a repository

Copy the name of the required module and run the installation command:

Install-Module DellBIOSProvider

The specified module will be downloaded from the PSGallery and installed on your computer.

Additional useful installation options:

  • -Repository – can be used to manually specify the name of the source repository from which to install or search for a module.
  • -RequiredVersion – specify the exact version of the PowerShell module required (by default, the latest available version is installed).
  • -Scope – allows you to install the module only for the current user (CurrentUser) or for all users on the computer (AllUsers).
  • -Force – used to perform a forced installation of a PowerShell module without prompting for confirmation.

To list third-party PowerShell modules installed on the computer (by default, they are installed in the C:\Program Files\WindowsPowerShell\Modules folder):

Get-InstalledModule

The command prints the module versions, descriptions, and repositories from which they were obtained. You can show additional module information, such as the installation date, release date, installation directory, and other details:

Get-InstalledModule| Select Name, Version, PublishedDate, InstalledDate , InstalledLocation

Get-InstalledModule

Windows includes several built-in (preinstalled) modules, including modules for remotely administering Windows Server hosts and their roles (as part of the Remote Server Administration Tools/ RSAT). The built-in system modules are located in the folder C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules.

To list all the built-in PowerShell modules, run the command:

Get-Module -ListAvailable

In order to use a module, it must first be imported into the current PowerShell session. To import a specific module, run:

Import-Module DellBIOSProvider

In addition, modules can be imported manually from any directory:

Import-Module "C:\Temp\MyCustomModule"

PowerShell dynamically loads (imports) modules into memory from the directories specified in the $env:PSModulePath environment variable upon the initial invocation of a cmdlet associated with that module.

The following command displays only the modules that have already been loaded (imported) into the current session. To check whether the specified module has been loaded, run the command:

Get-Module

Get-Module - list imported into current session

By default, the PowerShell execution policy on Windows 10 and 11 client editions is configured to Restricted, thereby preventing the execution of third-party scripts and modules. Therefore, an error will occur when attempting to use the new module.

Import-Module : File C:\Program Files\WindowsPowerShell\Modules\DellBIOSProvider\2.9.1\DellBIOSProvider.psm1 cannot be loaded because running scripts is disabled on this system.

Import-Module cannot be loaded because running scripts is disabled on this system

To enable the execution of local PowerShell scripts (including modules), run the following command:

Set-ExecutionPolicy RemoteSigned

List the PowerShell commands (cmdlets) available in a module:

Get-Command -Module DellBIOSProvider

Get-Command - list available cmdlets in a module

The PSModulePath environment variable contains a list of directories from which modules can be imported without specifying their full path.

$env:PSModulePath -split ";"

By default, it contains:

  • Modules for all users – $Env:ProgramFiles\WindowsPowerShell\Modules
  • Modules for the current user (administrator privileges are not required for installation) – $HOME\Documents\WindowsPowerShell\Modules
  • Built-in PowerShell modules – $PSHOME\Modules

PSModulePath

Multiple versions of the same module can be installed on a computer. You can list the available versions of a module with:

Get-Module pswindowsupdate -ListAvailable

List installed PowerShell module versions

How to Install PowerShell Modules Manually (Including Offline Installation)

In order to install modules from PSGallery, your computer must be able to access the online repository. If the computer is connected to an isolated network (firewalled or air-gapped), PowerShell modules can be downloaded and installed manually.

You can first save the required PowerShell module from PSGallery to a local folder on any online computer:

Save-Module –Name PSWindowsUpdate –Path C:\Temp\

Then copy the module folder from the C:\Program Files\WindowsPowerShell\Modules directory to the offline computer.

Or you can download the module package in .nupkg format (for example, pswindowsupdate.2.2.1.4.nupkg) from the PSGallery website, copy it to a local folder, and create a local repository:

Register-PSRepository -Name myLocalPSRepo -SourceLocation C:\PSRepo -InstallationPolicy Trusted

You can then install the module from the local folder:

Install-Module PSWindowsUpdate -Repository myLocalPSRepo

See How to install PowerShell modules in offline mode.

Updating PowerShell Modules

To update a specific module to the latest version in the repository, specify its name in the following command:

Update-Module -Name PSWindowsUpdate

To update all installed modules at once without prompting for confirmation, run:

Update-Module -Force

After updating a module, it needs to be re-imported into the PowerShell session. You can either close and reopen the PowerShell console or force the module to be re-imported:

Import-Module -Name PSWindowsUpdate -Force

Removing PowerShell Modules

Use the following command to remove an old or unused PowerShell module:

Uninstall-Module -Name PSWindowsUpdate

If the module is currently in use, you must first unload it from the current PowerShell session:

Remove-Module -Name PSWindowsUpdate

Then you can remove the module using the -Force option:

Uninstall-Module -Name PSWindowsUpdate -Force

For more information, see How to remove PowerShell modules in Windows.

Most Useful PowerShell Modules for SysAdmins

Below is a list of popular PowerShell modules commonly used by system administrators for infrastructure management and automation tasks:

  • NetSecurity – a built-in module for managing Windows Firewall rules
  • ScheduledTasks – a built-in module for managing Task Scheduler jobs
  • RSAT-AD-PowerShell – a module for interacting with the Active Directory infrastructure
  • PSWindowsUpdate – a module for managing Windows Updates from the PowerShell prompt
  • CredentialManager – a module to access the Windows Credential Manager
  • SimplySql — a universal module used to connect to popular SQL databases, including MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, and SQLite
  • VMware.PowerCLI – a module used to administer VMware infrastructure
  • WinGet package manager client module for Windows
0 comment
0
Facebook Twitter Google + Pinterest
PowerShell
previous post
Configure NFS Server on Windows Server (2025, 2022, 2019)

Related Reading

Monitor Windows Log Files in Real Time with...

March 26, 2026

Inactive TS Ports in Windows: Causes and Fixes

July 21, 2026

Backup/Sync to Cloud Storage with Rclone on Windows

October 9, 2026

Pin and Unpin Apps to Taskbar in Windows...

March 26, 2026

Manage Microsoft Store Apps with Store CLI in...

July 2, 2026

How to Extract Printer Drivers from Windows

March 26, 2026

Windows Installer Folder Too Large? How to Clean...

November 24, 2026

Find Computers with Pending Reboot Status Using PowerShell

April 15, 2026

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Managing PowerShell Modules in Windows: Install, Update & Remove

    November 24, 2026
  • Windows Installer Folder Too Large? How to Clean Up Safely

    November 12, 2026
  • Shrink WSL2 and Docker Desktop VHDX Files in Windows

    November 11, 2026
  • We Can’t Sign In to Your Account: Fix Temporary User Profile in Windows

    October 20, 2026
  • Backup/Sync to Cloud Storage with Rclone on Windows

    October 9, 2026
  • Fix Missing “Yes” Button in User Account Control Prompt on Windows

    October 7, 2026
  • Block Specific Keyboard Shortcuts with Keyboard Filter on Windows

    October 3, 2026
  • How to Set Task Priority in Windows Task Scheduler

    September 22, 2026
  • AutoStart Program at RDP Logon in Windows RDS

    September 8, 2026
  • How to Convert Windows Machine into a Proxmox VM

    August 30, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • How to Hide (Block) a Specific Windows Update
  • Run Elevated Commands with Sudo on Windows 11
  • Fix: Slow Startup of PowerShell Console and Scripts
  • Automate Software and Settings Deployment with WinGet Configure (DSC)
  • Backup/Sync to Cloud Storage with Rclone on Windows
  • Pin and Unpin Apps to Taskbar in Windows 11 via PowerShell
  • How to Pause (Delay) Update Installation on Windows 11 and 10
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top