Test-Driving PowerShellGet Module

by Jul 18, 2016

PowerShell 3+

PowerShell 5.0 ships with a new module called PowerShellGet, and on older PowerShell versions, you can easily download and install this module from www.powershellgallery.com.

With it, you have a bunch of new cmdlets that can search for, find, download, and install modules from public and private repositories.

Here is a quick transcript that walks you through the steps and helps you discover the immense usefulness of PowerShellGet:

# if you don't have these cmdlets, go to
# http://www.powershellgallery.com and download PowerShellGet!
# it is included in PowerShell 5.0 and available as MSI package for
# older PowerShell versions!

# find modules by using a keyword
Find-Module *local*

# take a look at details for a specific module
Find-Module LocalUserManagement | Select-Object -Property *

# download and install a module that you trust
Install-Module localusermanagement -Scope CurrentUser

# verify the installation
Get-Module localusermanagement -ListAvailable

# find all new commands exported by the module
Get-Command -Module localusermanagement

# run one of the new commands
Test-IsAdministrator

Twitter This Tip! ReTweet this Tip!