Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • PowerShell 2.0: One Cmdlet at a Time #8 Get-Module

    Posted on November 23rd, 2009 Jonathan Medd No comments

    Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Get-Module cmdlet.

    What can I do with it?

    PowerShell 2.0 introduces the concept of modules; essentially they are the evolution of snapins from PowerShell 1.0. There are some great videos below by Bruce Payette and Osama Sajid from the PowerShell team both introducing and demonstrating how to use modules: (Thanks Shay)

    Episode one introduces Modules and discusses comparisons with CmdLets.
    Episode two demonstrates how to use Modules.
    Episode three illustrates how to develop script and binary Modules

    Example:

    Retrieve all the modules on the current system which could be imported into the current session

    Get-Module -ListAvailable

    How could I have done this in PowerShell 1.0?

    You could have used the Get-PSSnapin cmdlet to see which snapins were available to use. To see snapins available in the current session:

    Get-PSSnapin

    To see snapin’s available to add to the current session use the Registered paramater:

    Get-PSSnapin -Registered

    1000 things 1% better!

    Leave a reply