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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jackson123
Resolver I
Resolver I

The SSMS sends an error when executing the powershell job that is refreshing pbi dataset

I want using sql server job refreshing powerbi dataset with powershell command.  the powershell scirpt Executs succeeded in powershell. but The SSMS sends an error when executing the powershell job. the following error message:

The job step received an error in line 11 of the PowerShell script. The corresponding line is "login PowerBI - Credential $cred - Verbose;". Correct the script and reschedule the job. The error message returned by PowerShell is "Cannot recognize the" login PowerBI "item as the name of a cmdlet, function, script file, or runnable program. Check the spelling of the name. If the path is included, make sure the path is correct, and then try again. " Process exit code - 1 The step failed.

how to fix it ? thanks.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You are mixing concepts. You either initiate the refresh via SSMS or via Powershell, but not together or at the same time.  If you use Powershell you need to provide authentication, for example via Login-PowerBI .  For this to work you need to install the relevant Powershell packages.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

You are mixing concepts. You either initiate the refresh via SSMS or via Powershell, but not together or at the same time.  If you use Powershell you need to provide authentication, for example via Login-PowerBI .  For this to work you need to install the relevant Powershell packages.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors