Using PowerShell Gallery

by Apr 11, 2016

The PowerShell Gallery is a public repository for PowerShell scripts and modules. It is entirely managed by cmdlets. Before you can use the PowerShell Gallery to download new scripts and modules, or to share your own with others, you need the PowerShellGet module. It ships with PowerShell 5.0, but is available to older PowerShell versions as well.

Simply visit www.powershellgallery.com. On the start page, you’ll find a link to download the "MSI Installer" which installs the module and cmdlets needed to work with the Gallery.

Once you have installed the MSI package (not needed if you use PowerShell 5.0), you can search for content on the Gallery, download, and install it.

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

To take advantage of the many cmdlets in the "PowerShell Community Extensions", for example, you can download and install the "PSCX" module like this:

 
PS> Install-Module -Name PSCX -Scope CurrentUser

PS> Get-Command -Module PSCX | Select-Object Name, Version

Name                        Version
----                        -------
Resize-Bitmap               3.2.1.0
Add-DirectoryLength         3.2.1.0
Add-ShortPath               3.2.1.0
Dismount-VHD                3.2.1.0
Edit-HostProfile            3.2.1.0
Edit-Profile                3.2.1.0
Enable-OpenPowerShellHere   3.2.1.0
Get-ExecutionTime           3.2.1.0
Get-Parameter               3.2.1.0
Get-ScreenCss               3.2.1.0
Get-ScreenHtml              3.2.1.0
Get-ViewDefinition          3.2.1.0
help                        3.2.1.0
Import-VisualStudioVars     3.2.1.0
Invoke-BatchFile            3.2.1.0
Invoke-Elevated             3.2.1.0
Invoke-GC                   3.2.1.0
Invoke-Method               3.2.1.0
Invoke-NullCoalescing       3.2.1.0
Invoke-Ternary              3.2.1.0
less                        3.2.1.0
Mount-VHD                   3.2.1.0
Out-Speech                  3.2.1.0
QuoteList                   3.2.1.0
QuoteString                 3.2.1.0
Resolve-ErrorRecord         3.2.1.0
Resolve-HResult             3.2.1.0
Resolve-WindowsError        3.2.1.0
Set-LocationEx              3.2.1.0
Set-ReadOnly                3.2.1.0
Set-Writable                3.2.1.0
Show-Tree                   3.2.1.0
Start-PowerShell            3.2.1.0
Stop-RemoteProcess          3.2.1.0
New-HashObject              3.2.1.0
Add-PathVariable            3.2.1.0
Clear-MSMQueue              3.2.1.0
ConvertFrom-Base64          3.2.1.0
ConvertTo-Base64            3.2.1.0
ConvertTo-MacOs9LineEnding  3.2.1.0
ConvertTo-Metric            3.2.1.0
ConvertTo-UnixLineEnding    3.2.1.0
ConvertTo-WindowsLineEnding 3.2.1.0
Convert-Xml                 3.2.1.0
Disconnect-TerminalSession  3.2.1.0
Edit-File                   3.2.1.0
Expand-Archive              3.2.1.0
Export-Bitmap               3.2.1.0
Format-Byte                 3.2.1.0
Format-Hex                  3.2.1.0
Format-Xml                  3.2.1.0
Get-ADObject                3.2.1.0
Get-AdoConnection           3.2.1.0
Get-AdoDataProvider         3.2.1.0
Get-Clipboard               3.2.1.0
Get-DhcpServer              3.2.1.0
Get-DomainController        3.2.1.0
Get-DriveInfo               3.2.1.0
Get-EnvironmentBlock        3.2.1.0
Get-FileTail                3.2.1.0
Get-FileVersionInfo         3.2.1.0
Get-ForegroundWindow        3.2.1.0
Get-Hash                    3.2.1.0
Get-HttpResource            3.2.1.0
Get-LoremIpsum              3.2.1.0
Get-MountPoint              3.2.1.0
Get-MSMQueue                3.2.1.0
Get-OpticalDriveInfo        3.2.1.0
Get-PathVariable            3.2.1.0
Get-PEHeader                3.2.1.0
Get-Privilege               3.2.1.0
Get-PSSnapinHelp            3.2.1.0
Get-ReparsePoint            3.2.1.0
Get-RunningObject           3.2.1.0
Get-ShortPath               3.2.1.0
Get-TerminalSession         3.2.1.0
Get-TypeName                3.2.1.0
Get-Uptime                  3.2.1.0
Import-Bitmap               3.2.1.0
Invoke-AdoCommand           3.2.1.0
Invoke-Apartment            3.2.1.0
Join-String                 3.2.1.0
New-Hardlink                3.2.1.0
New-Junction                3.2.1.0
New-MSMQueue                3.2.1.0
New-Shortcut                3.2.1.0
New-Symlink                 3.2.1.0
Out-Clipboard               3.2.1.0
Ping-Host                   3.2.1.0
Pop-EnvironmentBlock        3.2.1.0
Push-EnvironmentBlock       3.2.1.0
Read-Archive                3.2.1.0
Receive-MSMQueue            3.2.1.0
Remove-MountPoint           3.2.1.0
Remove-ReparsePoint         3.2.1.0
Resolve-Host                3.2.1.0
Send-MSMQueue               3.2.1.0
Send-SmtpMail               3.2.1.0
Set-BitmapSize              3.2.1.0
Set-Clipboard               3.2.1.0
Set-FileTime                3.2.1.0
Set-ForegroundWindow        3.2.1.0
Set-PathVariable            3.2.1.0
Set-Privilege               3.2.1.0
Set-VolumeLabel             3.2.1.0
Skip-Object                 3.2.1.0
Split-String                3.2.1.0
Stop-TerminalSession        3.2.1.0
Test-AlternateDataStream    3.2.1.0
Test-Assembly               3.2.1.0
Test-MSMQueue               3.2.1.0
Test-Script                 3.2.1.0
Test-UserGroupMembership    3.2.1.0
Test-Xml                    3.2.1.0
Write-BZip2                 3.2.1.0
Write-Clipboard             3.2.1.0
Write-GZip                  3.2.1.0
Write-Tar                   3.2.1.0
Write-Zip                   3.2.1.0
 

Twitter This Tip! ReTweet this Tip!