title: How to return the name of the calling script from a Powershell Module?
body: <p>I have two Powershell files, a module and a script that calls the module.</p>
  
  <p><strong>Module: test.psm1</strong></p>
  
  <pre><code>Function Get-Info {
      $MyInvocation.MyCommand.Name
  }
  </code></pre>
  
  <p><strong>Script: myTest.ps1</strong></p>
  
  <pre><code>Import-Module C:\Users\moomin\Documents\test.psm1 -force
  Get-Info
  </code></pre>
  
  <p>When I run <code>./myTest.ps1</code> I get </p>
  
  <p><code>Get-Info</code></p>
  
  <p>I want to return the name of the calling script (test.ps1). How can I do that?</p>