Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
itsmebvk
Continued Contributor
Continued Contributor

Power BI Audit Log - Cmdlet issue

 

Hi Experts,

 

I am trying to extract Power BI logs to a local folder. But I am getting following error when I am trying. I have Power BI admin access, and I have installed all required modules in my machine.  I also tried the workaround suggested in this link, but it didn't solved my problem. I am exactly following the steps the steps mentioned in this video. Can some one please point the mistake I am doing ?

 

 

 

 

 

PS C:\Users\vamsikrishna.banka> Search-UnifiedAuditLog -StartDate 9/05/2022 -EndDate 9/06/2022 -ResultSize 5000 | ConvertTo-Csv | Out-File C:\Users\vamsikrishna.banka\Downloads\Audit\PowerBIAuditLog.csv
Search-UnifiedAuditLog : The term 'Search-UnifiedAuditLog' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the 
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Search-UnifiedAuditLog -StartDate 9/05/2022 -EndDate 9/06/2022 -Resul ...
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Search-UnifiedAuditLog:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException 

 

Thanks in advance

2 REPLIES 2
ibarrau
Super User
Super User

Hi, I can only say that you should be sure you are installing both necessary modules:

  • Install-Module -Name MicrosoftPowerBIMgmt (CMDLETS) (YES TO ALL)
  • Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5 (YES TO ALL)

Then remember your account must have PBI service admin role and exchange admin role. If you have all that I'm not sure what's going on. Maybe a newer version of the libraries have removed the request. There are many users with the same issue on the youtube video.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

itsmebvk
Continued Contributor
Continued Contributor

@ibarrau  Apologies for late reply. Thank you so much for your inputs. Yes you are correct some of the module were missing when I was trying. Everything seem to be working now.

 

Thanks again.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors