Hello Matthew,
You don’t need to use -WhatIf to get the expected result for your review. The Search-ADAccount cmdlet returns ADUser objects with the Enabled property which you can use to filter for only enabled inactive users, select the properties required in your CSV and pipe to Export-Csv.
Example:
Search-ADAccount -AccountInactive -TimeSpan ([timespan]10d) -UsersOnly |
Where-Object -FilterScript { $_.Enabled -eq $true } | Select-Object -Property SamAccountName, LastLogonDate, DistinguishedName |
Export-Csv -Path C:\enabled_inactive_users.csv -NoTypeInformation
I hope above helps.
Best,
Daniel