Zend certified PHP/Magento developer

Exporting same format to CSV

The command below I took straight from Microsoft’s website. It works and produces results like this: Name, PasswordLastSet, and LastLogonStamp. Now, I need to know what I have to put in to export it to CSV with the same format i.e. name, passwordlastset, lastlogonstamp etc.
I know nothing about PS scripting, so this may seem like a dumb question but I can’t figure it out. TIA

$d = [DateTime]::Today.AddDays(-180)

Get-ADUser -Filter ‘(PasswordLastSet -lt $d) -or (LastLogonTimestamp -lt $d)’ -Properties PasswordLastSet,LastLogonTimestamp | ft Name,PasswordLastSet,@{N=”LastLogonTimestamp”;E={[datetime]::FromFileTime($_.LastLogonTimestamp)}}