Home Dashboard Directory Help
Search

v4 bug: import-module state is validated at parse time against local modules by Oisín Grehan


Status: 

Active


5
0
Sign in
to vote
Type: Bug
ID: 791629
Opened: 6/28/2013 8:54:58 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Arguments to import-module seem to be validated at parse time when parsing a scriptblock.
Details
Sign in to post a comment.
Posted by Oisín Grehan on 6/28/2013 at 11:44 AM
Oops, this only happens when I manually load dynamic keywords first, by calling;

[Microsoft.PowerShell.Dsc.DscClassCache]::LoadDefaultCimKeywords()

I presume this error is the cause of the dynamic keywords that are loaded (one of which is a specialized import-module / ipmo).
Sign in to post a workaround.