title: PowerShell module - pass a parameter while importing module
body: <p>In the below sample module file, is there a way to pass the myvar value while importing the module.</p>
  
  <p>For example,</p>
  
  <pre><code>import-module -name .\test.psm1 -?? pass a parameter? e.g value of myvar
  
  #test.psm1
  $script:myvar = "hi"
  function Show-MyVar {Write-Host $script:myvar}
  function Set-MyVar ($Value) {$script:myvar = $Value}
  #end test.psm1
  </code></pre>
  
  <p>(This snippet was copied from another question.)</p>