title: List all previously-loaded PowerShell variables
body: <p>Is there a PowerShell command to list all previously loaded variables?</p>
  
  <p>I am running some PowerShell scripts in Visual Studio and would like to list all variables that are available in the current PowerShell session.</p>
  
  <p>I have tried the command:</p>
  
  <pre><code>ls variable:*;
  </code></pre>
  
  <p>But it returns the following:</p>
  
  <pre><code>System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  System.Management.Automation.PSVariable
  </code></pre>