Cyberithub

How to Install PowerShellGet on Windows 10 Using Few Easy Steps

Advertisements

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 '2.8.5.201' 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 2.8.5.201 -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     1.0.0.1  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                  1.0.0.1 PowerShellGet
Function      Find-DscResource              1.0.0.1 PowerShellGet
Function      Find-Module                   1.0.0.1 PowerShellGet
Function      Find-RoleCapability           1.0.0.1 PowerShellGet
Function      Find-Script                   1.0.0.1 PowerShellGet
Function      Get-InstalledModule           1.0.0.1 PowerShellGet
Function      Get-InstalledScript           1.0.0.1 PowerShellGet
Function      Get-PSRepository              1.0.0.1 PowerShellGet
Function      Install-Module                1.0.0.1 PowerShellGet
Function      Install-Script                1.0.0.1 PowerShellGet
Function      New-ScriptFileInfo            1.0.0.1 PowerShellGet
Function      Publish-Module                1.0.0.1 PowerShellGet
Function      Publish-Script                1.0.0.1 PowerShellGet
Function      Register-PSRepository         1.0.0.1 PowerShellGet
Function      Save-Module                   1.0.0.1 PowerShellGet
Function      Save-Script                   1.0.0.1 PowerShellGet
Function      Set-PSRepository              1.0.0.1 PowerShellGet
Function      Test-ScriptFileInfo           1.0.0.1 PowerShellGet
Function      Uninstall-Module              1.0.0.1 PowerShellGet
Function      Uninstall-Script              1.0.0.1 PowerShellGet
Function      Unregister-PSRepository       1.0.0.1 PowerShellGet
Function      Update-Module                 1.0.0.1 PowerShellGet
Function      Update-ModuleManifest         1.0.0.1 PowerShellGet
Function      Update-Script                 1.0.0.1 PowerShellGet
Function      Update-ScriptFileInfo         1.0.0.1 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