Forum Discussion
Connect by Powershell
Hi Anonymous ,
Have you installed "MicrosoftPowerBIMgmt" module?
Install-Module -Name MicrosoftPowerBIMgmt
And you can also see if these posts are helpful.
https://community.powerbi.com/t5/Service/PowerShell-Login-to-Power-BI-Write-Error/m-p/1094922
Can't connect to PowerBI service account
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes, I have installed the "MicrosoftPowerBIMgmt" module.
A present my script looks like this:
Import-Module MicrosoftPowerBIMgmt
Import-Module MicrosoftPowerBIMgmt.Profile
Connect-PowerBIServiceAccountBut I get the error below:
Connect-PowerBIServiceAccount : One or more errors occurred.
At C:\Temp\Scripts\PBIScript.ps1:15 char:1
+ Connect-PowerBIServiceAccount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...IServiceAccount:ConnectPowerBIServiceAccount) [Connect-PowerBIServiceAccount], Aggregat
eException
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount