cancel
Showing results for 
Search instead for 
Did you mean: 

Find articles, guides, information and community news

Most Recent
timmac Frequent Visitor
Frequent Visitor

PRODUCTS / COMPONENTS INVOLVED

  • Microsoft Power BI 
  • Microsoft Office 365 - Audit Logs
  • PowerShell

 

PROBLEM SCENARIO DESCRIPTION / GOAL

The goal here, is to look for a remote way that one can export the Office 365 Audit Log with a focus on Power BI for a given data range.

 

RESOLUTION ( SCRIPT )

The below script I was able to get to work in my environment.  It is very simple to provide an illustration of how to achieve the given goal.

 

NOTE: The following script is provided as a sample / illustration.

Script Block

Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
#the link specified here is strictly for use in the powershell and you will need to authenticate to use it
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Search-UnifiedAuditLog -StartDate 4/11/2019 -EndDate 5/9/2019 -RecordType PowerBI -ResultSize 1000 | Format-Table | More

 

ADDITIONAL INFORMATION / RESOURCE LINKS

Here is product documentaton on the Search-UnifiedAuditLog PowerShell cmdlet:  https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-audit/search-unifi...

 

Helpful resources

Join Blog
Interested in blogging for the community? Let us know.