title: Powershell to Excel formatting issues
body: <p>I am still quite new to PowerShell so forgive me if there are blatant errors with how I have gone about this.</p>
  <p>I am trying to setup a reporting system to allow me to capture Public IP addresses and computer info so we can whitelist remote users on certain systems.</p>
  <p>To do this I have used a restAPI and simple <code>Get-Cim</code> command. This will then write and append to an Excel file.</p>
  <p>I have everything working, however, The <code>$computerinfo</code> output keeps ending up on the row below the <code>$publicIP</code>.
  (please see attached)</p>
  <p><a href="https://i.stack.imgur.com/4DUf8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4DUf8.png" alt="Excel spreadsheet" /></a></p>
  <p>I recon I am over simplifying the script, and therefore missing a step. Any help would be greatly appreciated!</p>
  <pre><code>$PublicIP= Invoke-RestMethod http://ipinfo.io/ 
  $Computerinfo = Get-CimInstance Win32_ComputerSystem 
  $xlfile = &quot;C:\users\test\desktop\output.xlsx&quot; 
  
  $PublicIP,$Computerinfo|Select-Object UserName, Name, Model, Manufacturer, IP, City, Region, Country, Loc, Org , Postal, Timezone|Export-Excel $xlfile  -AutoSize -StartRow 1  -TableName report -NoHeader -append 
  </code></pre>