Pass Parameter to a "Import-PowerModule" script

Jul 12, 2010 at 3:39 PM

Hi,

 

is there a way to pass parameters / arguments to a script which is loaded with "Import-PowerModule"?

 

I tried this:

 

PowerWebPartScript:

 

Import-PowerModule -name test -Param1 "MyArgument"

 

 

 

PoweeModule Script:

 

Param([string]$Param1)
$writer.Write($Param1)

 

 

Is there a way to do this?

 

Regards,
Mich