PowerTip: Get PowerShell Module by Using –FullyQualifiedName Parameter

Summary: Learn how to get a specific Windows PowerShell module by using the –FullyQualifiedName parameter.

Hey, Scripting Guy! Question How can I look at the specific version of a Windows PowerShell module?

Hey, Scripting Guy! Answer In Windows PowerShell 4.0, you can do this by using the –FullyQualifiedName parameter of the 
           Get-Module cmdlet. You specify a hash table that contains the name and version of the module
           (you can also use the GUID). Here is an example using my Windows PowerShell ISE module:

Get-Module –FullyQualifiedName @{modulename="powershellisemodule";moduleversion="4.0"}

Comments (3)

  1. Another great tip, thanks for sharing!

  2. -NE $Null says:

    PS C:> get-module -FullyQualifiedName @{moduleName="powershellisemodule";moduleversion="4.0"}

    PS C:> get-module -FullyQualifiedName @{Name="ISE";moduleversion="4.0"}
    Get-Module : Cannot bind parameter ‘FullyQualifiedName’. Cannot convert value "System.Collections.Hashtable" to type

    "Microsoft.PowerShell.Commands.ModuleSpecification". Error: "The hashtable describing a module contains one or more members that are

    not valid. The valid members are (ModuleName, ModuleVersion, GUID). Remove the members that are not valid (‘Name’), then try again."
    At line:1 char:32
    + get-module -FullyQualifiedName @{Name="ISE";moduleversion="4.0"}
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Module], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.GetModuleCommand

    PS C:> get-module -FullyQualifiedName @{ModuleName="ISE";moduleversion="4.0"}

    PS C:> get-module -FullyQualifiedName @{ModuleName="ISE";moduleversion="1.0"}

    ModuleType Version Name ExportedCommands
    ———- ——- —- —————-
    Script ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}

Skip to main content