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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
shkhar
Employee
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/


@ 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!:
Mastering Power BI 2nd Edition

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/


@ 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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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