Forum Discussion

prakash82x's avatar
prakash82x
New Member
6 years ago

Offline installation of PowerBI PowerShell Module

Hi, I have been trying to perform PowerShell module instalation of MicrosoftPowerBIMgmt on a server which does not have Internet Connectivity and have not been successfull so far.

I would appreciate any help on this.

 

Here is what I have tried so far.

* Saved the module on a server which has Internet Connectivity

 

 

 

Save-Module MicrosoftPowerBIMgmt -Path C:\temp\PowerBIPSModule

 

 

 

Zipped the folder and copied it over to the destination server under following location:

 

 

 

C:\Program Files\WindowsPowerShell\Modules

 

 

 

It contains several folders as below:

 

 

 

    Directory: C:\Program Files\WindowsPowerShell\Modules
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Admin
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Capacities
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Data
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Profile
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Reports
d-----        7/21/2020  10:54 AM                MicrosoftPowerBIMgmt.Workspaces

 

 

 

I am able to list the module and cmdlets also :

 

 

 

PS C:\> Get-Module -ListAvailable
    Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.840    MicrosoftPowerBIMgmt
Binary     1.0.840    MicrosoftPowerBIMgmt.Admin          {Add-PowerBIEncryptionKey, Get-PowerBIEncryptionKey, Get-P...
Binary     1.0.840    MicrosoftPowerBIMgmt.Capacities     Get-PowerBICapacity
Binary     1.0.840    MicrosoftPowerBIMgmt.Data           {Add-PowerBIDataset, Set-PowerBITable, New-PowerBIDataset,...
Binary     1.0.840    MicrosoftPowerBIMgmt.Profile        {Connect-PowerBIServiceAccount, Disconnect-PowerBIServiceA...
Binary     1.0.840    MicrosoftPowerBIMgmt.Reports        {Get-PowerBIReport, New-PowerBIReport, Export-PowerBIRepor...
Binary     1.0.840    MicrosoftPowerBIMgmt.Workspaces     {Get-PowerBIWorkspace, Get-PowerBIWorkspaceMigrationStatus...

 

 

 

Now when I try to login it errors out:

 

 

 

PS C:\> Connect-PowerBIServiceAccount
Connect-PowerBIServiceAccount : One or more errors occurred.
At line:1 char:1
+ Connect-PowerBIServiceAccount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], AggregateException
    + FullyQualifiedErrorId : System.AggregateException

PS C:\>

 

 

 

Please help...

5 Replies

  • Hi there

    In order to log into the Power BI Service, it does require Internet connectivity from where the PowerShell module is being run from.

    As you indicated the server does NOT have internet, and that could explain why you are getting the error.

    What happens if you try the same command on your server that DOES have internet, does it work:?
    • prakash82x's avatar
      prakash82x
      New Member

      Hey Thanks for looking into this,

      Initially I also thought that this is happeing because of no Internet connectivity but that does not seem to be the only reason here.

      Here is what I did to prove that.

      I installed the Module on a Server with Internet Connectivity using Install-module from PowerShell Gallery and then ran the command Connect-PowerBIServiceAccount. As expected, this command worked fine and without giving any error it opened up an authentication window prompting for Username and Passoword which shows it is working properly.

       

      I then Uninstalled the module from this server and copied the saved modules to module directory that I downloaded using Save-Module command which was copied to the server with no internet.

       

      I again tried the same command Connect-PowerBIServiceAccount, now Ideally this should have worked because the server does have Internet Connectivity but it gave the same error message which we were getting on the server with no internet.

      This makes me think that the method I followed to install PowerBI Modules on a server with no internet has something still missing and because of that it is not working on a server with Internet too.

       

       

      • GilbertQ's avatar
        GilbertQ
        Icon for Super User rankSuper User
        Could it be that it installed some other PowerShell Modules?

        Or do you have the latest version of PowerShell installed on both servers?