Registering Default PowerShell Repository

by Sep 1, 2017

If you use the PowerShellGet module (which ships by default on Windows 10 and Server 2016), you can easily download and install shared PowerShell scripts and modules:

 
PS> Find-Module -Tag Security

Version    Name              Repository    Description                                      
-------    ----              ----------    -----------                                      
2.5.0      Carbon            PSGallery     Carbon is a PowerShell module for automating t...
0.8.1      ACMESharp         PSGallery     Client library for the ACME protocol, which is...
2.22       DSInternals       PSGallery     The DSInternals PowerShell Module exposes seve...
1.2.0.0    DSCEA             PSGallery     DSCEA is a scanning engine for processing Test...
 

Sometimes, the default PSGallery repository is missing on your machine, though. To restore the default settings, run this:

 
PS> Register-PSRepository -Default
 

Twitter This Tip! ReTweet this Tip!