Hi experts

i have exported my mailboxes using the below command

Get-Mailbox -ResultSize unlimited | select userprincipalname C:\users.csv.

i want to import this csv file and get for how many users mailbox auditing is enabled or disabled.

experts help me on this

5 Spice ups

Why not avoid using the csv as an input and just get the result directly?

Get-Mailbox -ResultSize unlimited | where {$_.auditenabled -eq $True} | select userprincipalname, auditenabled | export-csv C:\users.csv
1 Spice up

Get-Mailbox -ResultSize Unlimited| select userprincipalname,auditenabled|export-csv c:\jayce\audit.csv -NoTypeInformation

The result:

Get-Mailbox -ResultSize Unlimited | Select Name, AuditEnabled, AuditLogAgeLimit | Out-Gridview

Enable or disable mailbox audit logging for a mailbox: