title: Needing to Export results from Powershell to Excel
body: <p>I'm pretty new to Powershell and trying to see how I can export the results in the powershell script to an excel file. </p>
  
  <p>Here is the script i'm using so far. </p>
  
  <pre><code>###Upgrade###
  
  ####Text File Location###### 
  
  $YourFile = Get-Content 'C:\Users\username\Desktop\PowerShell\target.txt'
  foreach ($computer in $YourFile) {
  
  ####Ram Check#####
  
  Get-WmiObject win32_physicalmemory -Computername $computer | Format-Table PScomputername,Banklabel,Configuredclockspeed,Devicelocator,Capacity -autosize 
  
  }
  
  Read-Host -Prompt "Press Enter to exit"
  </code></pre>