Import-Module needs a -Guid parameter to disambiguate like #requires -module has - by Joel 'Jaykul' Bennett

Status : 


Sign in
to vote
ID 786022 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 5/1/2013 12:21:15 PM
Access Restriction Public


Import-Module needs parity with the #requires statement (and vice versa).

Right now there's no way to use Import-Module to import a module with a specific GUID the way there is with #requires, (and #requires doesn't have the -MinimumVersion vs -RequiredVersion semantics).  See the Expected results for examples of what I would like to be able to do
Sign in to post a comment.
Posted by Joel 'Jaykul' Bennett on 10/15/2015 at 1:42 PM
Looks like this is implemented in PS5 but using "RequiredVersion" in the #requires line and "FullyQualifiedName" instead of "ModuleInfo" as the parameter name for Import-Module and Get-Module