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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Community Champion
Community Champion

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!:
DAX For Humans

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
Community Champion
Community Champion

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!:
DAX For Humans

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.