Get-ADUser -Filter {attribute -like 'Yes'} -Properties * | select attribute1, attribute2, attribute3, attribute4, attribute5, attribute5, attribute6 | Export-Csv -path 'd:\edu4.csv' -Encoding unicode
The attributes after the select are exported in the csv file.
If you want to find users with attribute not set you can use the following filter:
Get-ADUser -Filter {-not(extensionAttribute1 -like "*") }