Hi,
You can use the second script provided in my previous answer or just add a line to export user before the disable like this:
$Date = (Get-Date).AddDays(-90)
Get-ADUser -Filter {LastLogonDate -le $Date } -Properties LastLogonDate| select Samaccountname,LastLogonDate | Export-csv c:\lastlogon.csv
Get-ADUser -Filter {LastLogonDate -le $Date } -Properties LastLogonDate,lastLogonTimestamp | Disable-ADAccount
Please don't forget to mark helpful reply as answer