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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
shkhar
Microsoft Employee
Microsoft Employee

support for powershell scripting in power BI

Is there any support for powershell scripting in power BI

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

https://sethcoussens.com/2016/01/19/automation-series-1-part-2-powershell-and-power-bi/



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
matthew_davis02
Frequent Visitor

Is there any options for developers who would like to access the PowerBI API (specifically updating datasource) via AWS Linux-Based lambda?

 

param
New Member

Hi Everyone,

I was searching for some Live online help for Powershell.
However i didn't find any suitable online live group

So, i thought to create a Skype Group.
Here we can help each other to solve any Powershell issue or puzzle.

Please join me on https://join.skype.com/yY056Inw1A8q

Let's help each other.

Regards,
Param

Greg_Deckler
Super User
Super User

https://sethcoussens.com/2016/01/19/automation-series-1-part-2-powershell-and-power-bi/



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

 I was able to publish power bi report using PowerBi Import power shell CLI command

But suddenly it has stopped publishing and it give me below error .. please can someone help me how it can be resolved

 

powerbi ] Importing C:\Users\pawadet\Documents\PowerBi_reports\ETL_Card_1_Transaction_Failures.pbix to workspace: ddde32f2-a5f9-4027-b7c8-14c7c26989a3
[ powerbi ] File uploaded successfully
[ powerbi ] Import ID: 83a1090f-02e5-4255-953e-58f25eb0b052
powerbi : C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\lib\cli-import.js:69
At line:1 char:1
+ powerbi import -c $CollectionName -w $WSguid -k $accesKeyPBI -n $Card ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Users\pawade...li-import.js:69:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

cli_1.Cli.print('Checking import state: %s', importResult.importState);
^

TypeError: Cannot read property 'importState' of undefined
at C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\lib\cli-import.js:69:70
at C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\powerbi-api\lib\autorest\operations\imports.js:416:14
at retryCallback
(C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\systemErrorRetryPolicyFilter.js:85:9)
at retryCallback
(C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\exponentialRetryPolicyFilter.js:135:9)
at handleRedirect (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\redirectFilter.js:36:9)
at Request._callback (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\requestPipeline.js:126:16)
at Request.self.callback (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\request\request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\request\request.js:1044:10)

I was able to publish report using PowerBi Import CLI (power shell)command earlier

but suddenly this command is giving me below error

No idea why this is coming now..

powerbi ] Importing C:\Users\pawadet\Documents\PowerBi_reports\ETL_Card_1_Transaction_Failures.pbix to workspace: ddde32f2-a5f9-4027-b7c8-14c7c26989a3
[ powerbi ] File uploaded successfully
[ powerbi ] Import ID: 83a1090f-02e5-4255-953e-58f25eb0b052
powerbi : C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\lib\cli-import.js:69
At line:1 char:1
+ powerbi import -c $CollectionName -w $WSguid -k $accesKeyPBI -n $Card ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Users\pawade...li-import.js:69:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

cli_1.Cli.print('Checking import state: %s', importResult.importState);
^

TypeError: Cannot read property 'importState' of undefined
at C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\lib\cli-import.js:69:70
at C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\powerbi-api\lib\autorest\operations\imports.js:416:14
at retryCallback
(C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\systemErrorRetryPolicyFilter.js:85:9)
at retryCallback
(C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\exponentialRetryPolicyFilter.js:135:9)
at handleRedirect (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\filters\redirectFilter.js:36:9)
at Request._callback (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\ms-rest\lib\requestPipeline.js:126:16)
at Request.self.callback (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\request\request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (C:\Users\pawadet\AppData\Roaming\npm\node_modules\powerbi-cli\node_modules\request\request.js:1044:10)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.