title: Powershell - convert new-object created with PSObject to number or integer
body: <p>I have a script that uses APIs to pull data from our MDM about phone devices. It creates a .csv file with many columns. The IMEI column shows as (for instance) 3.343434+14 instead of showing 334343412345678912345. Can anyone help show me how to have this output properly in the .csv file? I can manipulate the column properties after the fact, but would rather it just came out correct. It appears the output is coming through as general when I really want it to be a number/integer. </p>
  
  <p>I can't figure out where to possible enter [int] (if that's even what is required to fix this). </p>
  
  <pre><code>$data = $response.Device
  
  $data | foreach {
  $serial = $_.SerialNumber
  $phone = $_.PhoneNumber
  $ownership = $_.Ownership
  $enrollstat = $_.EnrollmentStatus
  $compliant = $_.ComplianceStatus
  $user = $_.UserName
  $asset = $_.AssetNumber
  $getlast = $_.LastSeen
  $imei = $_.Imei
  
  $lastdate = [DateTime]$getlast
  
  try{$lastdate = Get-Date $getlast}
  catch{write-host "NULL Date $serial"}
  
  $object = New-Object -TypeName PSObject
  $object | Add-Member -Name 'Serial Number' -MemberType NoteProperty -Value $serial
  $object | Add-Member -Name 'Phone Number' -MemberType Noteproperty -Value $phone
  $object | Add-Member -Name 'IMEI' -MemberType NoteProperty -Value $imei
  $object | Add-Member -Name 'Ownership' -MemberType Noteproperty -Value $ownership
  $object | Add-Member -Name 'Enrollment Status' -MemberType Noteproperty -Value $enrollstat
  $object | Add-Member -Name 'Compliance Status' -MemberType Noteproperty -Value $compliant
  $object | Add-Member -Name 'User' -MemberType Noteproperty -Value $user
  $object | Add-Member -Name 'Asset Number' -MemberType Noteproperty -Value $asset
  $object | Add-Member -Name 'Last Seen Date' -MemberType NoteProperty -Value $lastdate
  
  </code></pre>
  
  <p>I would like the .cvs column to show the entire IMEI number and not have decimals nor be truncated.</p>