Download Power BI Audit Logs with the New Get-PowerBIActivityEvent cmdlet

You may also like...

13 Responses

  1. Thanks for the great blog post

    When I try and run the command above, where I am a Global Admin it simply returns the following in the JSON file


    Any idea why?

    • Aaron Nelson says:

      Thanks, I’m glad you like the post. In my testing, when I received [] as the result, that was indicated there was no activity to report that day. If you’re receiving that result for a day where you know there’s activity, that may mean that there’s an issue with the service which supplies the data to the API/Get-PowerBIActivityEvent cmdlet.

  2. Jason Hurley says:

    This is great, thanks! One little typo though – in your two code examples (but not in your code screenshot), you forgot the ‘s’ on the end of Get-PowerBIActivityEvents

    • Aaron Nelson says:

      Thanks, glad you liked it.

      I’m also glad you’re paying lose attention. It’s not a typo though, they renamed the cmdlet and pushed out a new version of the module. (PowerShell cmdlets aren’t supposed to be named in the plural.) Run Update-Module MicrosoftPowerBIMgmt -WhatIf and you will probably see that v 1.0.802 is waiting for you

      • Jason Hurley says:

        Thanks! I’m pretty new to the PowerShell world, so the nuances are interesting. I ran the update you recommended and tried both the singular and plural versions of the cmdlet and both work! Maybe there’s a transition period for those who started using the plural version? I can’t imagine they’d keep both hanging around.

        • Aaron Nelson says:

          Yes, they added an alias to the module named Get-PowerBIActivityEvents which simply points to theGet-PowerBIActivityEvent cmdlet. You can see this for yourself by running: Get-Command -Module MicrosoftPowerBIMgmt*

          Make sure you include that star on the end, otherwise you’ll get nothing back.

Leave a Reply to Jason Hurley Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: