title: Error when importing a module
body: <p>I am creating a useful powershell module for myself, for repetitive tasks.</p>
  
  <p>As an example I will use one function within the module.</p>
  
  <pre><code>function GetUserInfo
  {
      $user_name = $env:UserName
      $user_domain = $env:UserDomain
      $user_computer = $env:COMPUTERNAME
      $user_ip = [System.Net.Dns]::GetHostAddresses($user_computer);
      $user_ip = $user_ip[1].IPAddressToString
  
      return $user_info = "$user_domain/$user_ip/$user_computer/$user_name"
  }
  export-modulemember -function GetUserInfo
  </code></pre>
  
  <p>Every time I try to load the module </p>
  
  <pre><code>Import-Module \\erpscriptprod\Library\PowerShell\PowerShell_BaseLibrary.ps1
  </code></pre>
  
  <p>I get the followoing error...</p>
  
  <blockquote>
    <p>The Export-ModuleMember cmdlet can only be called from inside a module</p>
  </blockquote>
  
  <p>I am new to powershell, but from where I'm sitting, I swear I am calling it inside the module. I can't seem to find the error online, but I doubt I'm the only person to experience this.</p>