Forum Discussion
Powerbi Usage powershell scripts failed
Hi Saravanan_ameer ,
Based on web search results, this error may occur when you try to run the Search-UnifiedAuditLog cmdlet in PowerShell to search the audit log in Exchange Online. Some possible causes and solutions are:
- You may not have the required permissions to run the cmdlet. You need to be assigned the View-Only Audit Logs role or the Audit Logs role in Exchange Online. You can check your role assignments by running the Get-RoleAssignmentPolicy cmdlet.
- You may have a connectivity issue with Exchange Online. You can try to reconnect to Exchange Online by using the Connect-ExchangeOnline cmdlet with the ShowBanner parameter. This will display a banner that shows the server name and version of Exchange Online that you are connected to.
- You may have a problem with the Exchange Online Management module or the PSWSMan module. You can try to update these modules by running the Update-Module cmdlet with the names of the modules. For example:
Update-Module -Name ExchangeOnlineManagement
Update-Module -Name PSWSMan
Refer to:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.