Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to Solution.
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.
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.