Anthony K O365
asked on
Search Exchange 2016 Audit Logs
Need to search Audit log ALL mailboxes affected by an admin action on a particular date range... The csv Output should have the following columns:
Search-MailboxAuditLog -Id < > -LogonTypes admin -ShowDetails -StartDate 11/23/2018 -EndDate 11/27/2018 | select logontype,lastaccessed,log ondisplayn ame,operat ionresult, operation, logonUserd isplayname
Search-MailboxAuditLog -Id < > -LogonTypes admin -ShowDetails -StartDate 11/23/2018 -EndDate 11/27/2018 | select logontype,lastaccessed,log
You can use the following command:
Search-MailboxAuditLog -Identity nelson -LogonTypes Owner -StartDate (Get-Date).AddHours(-2) -ShowDetails | fl operation*,logonuserdispla yname,sour ceitemsubj ect* | Export-CSV C:\AdminAuditLogResults.cs v
Search-MailboxAuditLog -Identity nelson -LogonTypes Owner -StartDate (Get-Date).AddHours(-2) -ShowDetails | fl operation*,logonuserdispla
my command as below:
#Set-Mailbox -Identity “andy” -AuditOwner Create, SoftDelete, HardDelete, Update, Move, MoveToDeletedItems -AuditEnabled $true
#Search-MailboxAuditLog -ShowDetails -Identity “andy” -LogonTypes owner
#Search-MailboxAuditLog -Identity andy -LogonTypes Owner -StartDate (Get-Date).AddHours(-1) -ShowDetails
#Search-MailboxAuditLog -Identity nelson -LogonTypes Owner -StartDate (Get-Date).AddHours(-2) -ShowDetails | fl operation*,logonuserdispla yname,sour ceitemsubj ect* | Export-CSV C:\AdminAuditLogResults.cs v
#Set-Mailbox -Identity “andy” -AuditOwner Create, SoftDelete, HardDelete, Update, Move, MoveToDeletedItems -AuditEnabled $true
#Search-MailboxAuditLog -ShowDetails -Identity “andy” -LogonTypes owner
#Search-MailboxAuditLog -Identity andy -LogonTypes Owner -StartDate (Get-Date).AddHours(-1) -ShowDetails
#Search-MailboxAuditLog -Identity nelson -LogonTypes Owner -StartDate (Get-Date).AddHours(-2) -ShowDetails | fl operation*,logonuserdispla
ASKER
Saif,
the mailboxes are already set for auditing. I need a way to output ALL the mailboxes into a csv...not just one at a time.
the mailboxes are already set for auditing. I need a way to output ALL the mailboxes into a csv...not just one at a time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What exactly will this do for me?
ASKER
After looking at the command closer, this is what I was looking for!
Thanks!!
Thanks!!
ASKER