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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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