Remove empty attributes from Get-Mailbox

I am using the following code to get a dump of exchange data, but I don’t want attributes that don’t have data with it. How do I go through the attributes and remove the attributes that don’t have data?
<pre class=“lang:ps decode:true”>Get-MailboxStatistics -identity $ID | Select DisplayName, @{expression={$.totalDeletedItemSize.value.ToKB()};label=“DelSize(KB)”}, MailboxGUID, ServerName, @{Name=“Mailbox Size (MB)”;Expression={$.“TotalItemSize”.Value.ToMB()}}, StorageGroupName, DatabaseName, itemcount, LastLogonTime |
Out-File -encoding ascii $User -width 750

Get-Mailbox -identity $ID |Format-List * |
Out-File -encoding ascii $User -width 750  -append 	  
    $conn.Close()

 Get-content $User | where {$_ -ne ""} | Out-file $Newfile
 Remove-Item $User</pre>

 

for example it would look like this…

Once you have your format-list results in a file, do something like this:

Get-Content $user | Where-Object {$_ -notmatch ‘:\s+$’} | Set-Content $Newfile
Remove-Item $user

Thank you Poshoholic! That is simpler then what I had figured out.