Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot make it work in powershell 5.1 #41
Maybe, I'm not getting it correctly, so feel free to blame me, but...
Install-Module -name MicrosoftPowerBIMgmt # works like a charm
Import-Module -name MicrosoftPowerBIMgmt or just simply running Connect-PowerBIServiceAccount or anything else ends up with:
_Name : Windows PowerShell ISE Host
PSChildName : v2.0.50727
I've tried installing dotnet core 2.1, 2.1 SDK included the path to the netstandard.dll in path, with no luck.
I must be missing something.
Oh, I was kind of missing something "[Future release]". So it works in powershell core 6.0.2 (but no luck in 5.1.15063.1088), maybe the powerbi-powershell is only for powershell core 6.
It should work on PowerShell 5.1 with .NET Framework 4.6.1, currently it doesn't work on PowerShell Core due to the Power BI SDK package which uses AutoRest and ClientRuntime which target .NET Standard 1.4 instead of .NET Standard 2.0 causing it to fall back to .NET Framework 4.6.1. When that is fixed, it will work on both Windows PowerShell 3.0+ with .NET 4.6.1+ and PowerShell Core 6.0+.
I'm deploying a clean machine to reproduce the issue. If I'm unable to, I will reply back with instructions to enable FusionLog to gather logs about which file it is failing to load. We try to bundle all dependencies into the module so errors like this don't happen. The dependencies are discovered automatically during the build\compile phase, we may have a gap where something indirectly is leveraged breaking the dependency graph.
Hi @pavel242242 I wasn't able to reproduce the error on a clean Windows 10 environment. Can you do the following so I can get logs?
In a PowerShell administrator prompt run the following:
$LogPath = "$env:SystemDrive\FusionLog" [void](New-Item -Path $LogPath -ItemType Directory -ErrorAction SilentlyContinue) Set-ItemProperty -Path $script:fusionPath -Name ForceLog -Value 1 -Type DWord Set-ItemProperty -Path $script:fusionPath -Name LogFailures -Value 1 -Type DWord Set-ItemProperty -Path $script:fusionPath -Name LogResourceBinds -Value 1 -Type DWord Set-ItemProperty -Path $script:fusionPath -Name LogPath -Value $LogPath -Type String
The above enables FusionLog to collect errors, then call:
You should see the error in the console again and you should get logs dropped to c:\FusionLog, zip them up and attach to issue.
To disable Fusion log run:
Remove-ItemProperty -Path $fusionPath -Name ForceLog Remove-ItemProperty -Path $fusionPath -Name LogFailures Remove-ItemProperty -Path $fusionPath -Name LogResourceBinds Remove-ItemProperty -Path $fusionPath -Name LogPath
I will dig through the logs and find out which assembly is missing.
hi, thanks, no luck yet, but even when I try your script, it doesn't produce any errors in the fusionlog directory. I will try it with someone who's better power shell scripting guy than myself and maybe I'll be able to resolve it. As for now, I postponed the project and. Pavel Pavel Chocholouš 2018-07-13 2:44 GMT+02:00 Chaz Beck <firstname.lastname@example.org>:…
Hi @pavel242242 <https://github.com/pavel242242> were you able to reproduce the issue and gather logs? I will close this issue next week if I don't get a response, hopefully you were able to load the cmdlets successfully. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#41 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJSouYafc2c4I11SeqkqzU_Fnx16UGAPks5uF-1-gaJpZM4U6CpL> .
Connect-PowerBIServiceAccount : The 'Connect-PowerBIServiceAccount' command was found in the module 'MicrosoftPowerBIMgmt.Profile', but the module could not be
and on running Import-Module MicrosoftPowerBIMgmt.Profile, I get this error message:
Import-Module : Could not load file or assembly 'netstandard, Version=22.214.171.124, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
I tried to run Fusion Log to capture the errors, but unfortunately I could not get it to work.
I have now got Fusion working. Attached is the Fusion zip file.
I am also receiving this error:
@CodeCyclone I attempted to generate Fushion logs as well, but run into the following null variable error:
What is $script:fusionPath intended to return?
I already had the .net framework installed and still receive the same error message as initially reported on this bug. The versions of software on my PC all seem to be supported, according to the documentation, Set up of as follows:
Windows 10 Education Version 1607 OS Build 14393.1884
I attached the Fusion logs zip file to my initial comment which hopefully will help trace the reason for the error.
I notice that this error is also reported in the power bi community developer forum
The Community Support Team there suggested that the ExecutionPolicy needed to be changed. This did not make any difference, however, even when set to unrestricted.
Should be fixed in https://www.powershellgallery.com/packages/MicrosoftPowerBIMgmt/1.0.326. You shouldn't need 4.7.2 (still need at least 4.6.1) but if you already have 4.7.2 then the issue is already avoided.