How to Install PowerShellGet on Windows 10 Using Few Easy Steps


In this article, we will see how to install PowerShellGet on Windows 10 using Few Easy Steps. PowerShellGet provides the capability to interact with PowerShell Gallery, a central repository for PowerShell content. It contains PowerShell scripts, modules containing PowerShell cmdlets and Desired State Configuration (DSC) resources. PowerShellGet has cmdlets that can discover, install, update and publish packages from PowerShell Gallery.

It makes developer's life easy by providing access to a great deal of code that can help in the development of their projects. Since it is a community driven repo, most of the packages are authored by PowerShell community. It is very easy to install and use. Here we will see the steps to install PowerShellGet on Windows 10 in great detail.


How to Install PowerShellGet on Windows 10 Using Few Easy Steps

How to Install PowerShellGet on Windows 10 Using Few Easy Steps

Also Read: How to Install Kubefwd on Windows 10 Using 7 Easy Steps

Step 1: Prerequisites

a) You should have a running Windows 10 Server.

b) You should have .NET Framework 4.5 or above installed in your System.

c) You should have access to install module using Windows PowerShell.


Step 2: Install PowerShellGet

You need to open Windows PowerShell and run Install-Module PowerShellGet -Force -AllowClobber command to install PowerShellGet as shown below. After successful installation, you need to open a new PowerShell session to load PowerShellGet module when using its cmdlets.

PS C:\> Install-Module PowerShellGet -Force -AllowClobber 
NuGet provider is required to continue PowerShellGet requires NuGet provider version '' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\cyberithub\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running
'Install-PackageProvider -Name NuGet -MinimumVersion -Force'. Do you want PowerShellGet to install and
import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y


Step 3: Check Version

You can also check the installed version and module type of PowerShellGet using Get-Module PowerShellGet command as shown below.

PS C:\> Get-Module PowerShellGet

ModuleType Version  Name                       ExportedCommands
---------- -------  ----                       ----------------
Script  PowerShellGet              {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...


Step 4: Check all Commands

You can check the list of cmdlets available through PowerShellGet module by using Get-Command -Module PowerShellGet command as shown below.

PS C:\> Get-Command -Module PowerShellGet

CommandType   Name                          Version Source
-----------   ----                          ------- ------
Function      Find-Command         PowerShellGet
Function      Find-DscResource     PowerShellGet
Function      Find-Module          PowerShellGet
Function      Find-RoleCapability  PowerShellGet
Function      Find-Script          PowerShellGet
Function      Get-InstalledModule  PowerShellGet
Function      Get-InstalledScript  PowerShellGet
Function      Get-PSRepository     PowerShellGet
Function      Install-Module       PowerShellGet
Function      Install-Script       PowerShellGet
Function      New-ScriptFileInfo   PowerShellGet
Function      Publish-Module       PowerShellGet
Function      Publish-Script       PowerShellGet
Function      Register-PSRepository PowerShellGet
Function      Save-Module          PowerShellGet
Function      Save-Script          PowerShellGet
Function      Set-PSRepository     PowerShellGet
Function      Test-ScriptFileInfo  PowerShellGet
Function      Uninstall-Module     PowerShellGet
Function      Uninstall-Script     PowerShellGet
Function      Unregister-PSRepository PowerShellGet
Function      Update-Module        PowerShellGet
Function      Update-ModuleManifest PowerShellGet
Function      Update-Script        PowerShellGet
Function      Update-ScriptFileInfo PowerShellGet


Step 5: Update Module

If you do not have the latest version installed then you can update the module by using Update-Module PowerShellGet command as shown below.

PS C:\> Update-Module PowerShellGet


Step 6: Register PowerShell Gallery

It is always recommended to register the PowerShell gallery as a trusted repository by using Set-PSRepository -Name PSGallery -InstallationPolicy Trusted command as shown below.

PS C:\> Set-PSRepository -Name PSGallery -InstallationPolicy Trusted


Step 7: Uninstall PowerShellGet

In case, if you decided not to use PowerShellGet module, then you can easily uninstall it from your system by using Uninstall-Module PowerShellGet command as shown below.

PS C:\> Uninstall-Module PowerShellGet

Leave a Comment