How to install the Powershell Module MicrosoftPowerBIMgmt with offline? - powershell

I want to install the Powershell Module MicrosoftPowerBIMgmt with below command line:
Install-Module -Name MicrosoftPowerBIMgmt
However, the script is executed, but it may be limited by my network, the command line has been stuck in downloading the microsoftpowerbimgmt.profile file, and the progress is 0.
It seems that I can't use the command to complete the download. So I wonder if there is any other scheme to install this module?
Any advice is greatly appreciated.
By the way, my system is windows 10.

I decided to run the install you gave and checking the docs it shows that one of the commands is Get-PowerBIWorkspace. With that in mind, I decided to try this trick:
(Get-Command Get-PowerBIWorkspace).dll
Which gave this result:
C:\Program Files\WindowsPowerShell\Modules\MicrosoftPowerBIMgmt.Workspaces\1.2.1093\lib\netstandard2.0\Microsoft.PowerBI.Commands.Workspaces.dll
This told me to look in C:\Program Files\WindowsPowerShell\Modules\ for the module. Checking that location, I found the following folders were added:
09/17/2022 08:52 PM <DIR> MicrosoftPowerBIMgmt.Profile
09/17/2022 08:52 PM <DIR> MicrosoftPowerBIMgmt.Admin
09/17/2022 08:53 PM <DIR> MicrosoftPowerBIMgmt.Capacities
09/17/2022 08:53 PM <DIR> MicrosoftPowerBIMgmt.Data
09/17/2022 08:53 PM <DIR> MicrosoftPowerBIMgmt.Reports
09/17/2022 08:53 PM <DIR> MicrosoftPowerBIMgmt.Workspaces
09/17/2022 08:53 PM <DIR> MicrosoftPowerBIMgmt
Checking the folders show that the data is around 50 MB. Modules are usually entirely contained in the module folder with no external changes made to the system (such as registry changes, or other files placed elsewhere). Since this is Microsoft, that might not be the case.
If I was in your shoes, I would probably use xcopy, or use a copy method you are familiar with, to copy these folders to the module folder on the system where you want the MicrosoftPowerBIMgmt module installed.
If these folders truly contain everything that makes the modules work, and you copy them to the module folder that is normally found in $Env:PSModulePath, then you should be able to successfully run your script.

Related

Why does wheel installation put shared objects in site-packages folder instead of package folder?

I've a python binary distribution [wheel] created via
python setup.py bdist_wheel
The wheel looks as follows
unzip -l dist/<package-name>-1.0.0-cp36-cp36m-linux_x86_64.whl
Archive: dist/<package-name>-1.0.0-cp36-cp36m-linux_x86_64.whl
Length Date Time Name
--------- ---------- ----- ----
2996432 2021-01-07 21:47 lib<xyz>.so
7821608 2021-01-07 21:48 lib<abc>.so
4414000 2021-01-07 21:48 <module>.cpython-36m-x86_64-linux-gnu.so
581 2021-01-07 20:05 <package-name>/__init__.py
636 2021-01-07 20:05 <package-name>/version.py
Upon installing the wheel, why do the *.so files get installed in site-package folder?
/opt/conda/lib/python3.6/site-packages/
While the other files get installed inside
/opt/conda/lib/python3.6/site-packages/<package-name>
Wheel is essentially a compressed form of package distribution. Hence it can be unzipped [like a zip file]. The entire directory structure inside the zipped wheel gets copied as is in the site-packages folder. This is the reason why
the shared libraries are stored inside site-packages and
rest of the package files [e.g. __init__.py are stored inside the package subfolder of the site-packages].
wheel gets unzipped in the site-packages folder essentially.

Can I run sbt new with a local template (not GitHub)?

I work in a secure environment where developers are not allowed to git-clone from GitHub, or any other external repos.
I was able to download a g8 template (play-scala-seed) from GitHub as a zip file and I've unzipped it to a local folder. Can I use that local directory instead of a git repo?
My first attempt at this failed:
> dir .\play-scala-seed
Volume in drive C is OSDisk
Volume Serial Number is A074-A016
Directory of C:\workspace\play-scala-seed
03/22/2018 11:03 AM <DIR> .
03/22/2018 11:03 AM <DIR> ..
03/22/2018 11:01 AM <DIR> project
03/22/2018 10:57 AM <DIR> src
03/22/2018 11:03 AM <DIR> target
03/22/2018 10:57 AM 70 .gitignore
03/22/2018 10:57 AM 509 .travis.yml
03/22/2018 10:57 AM 453 build.sbt
03/22/2018 10:57 AM 439 LICENSE
03/22/2018 10:57 AM 1,166 README.md
5 File(s) 2,637 bytes
5 Dir(s) 220,172,980,224 bytes free
Even though I'm sure the template exists and in in a directory called "play-scala-seed", it's not accepted by the SBT new command:
> sbt new .\play-scala-seed
Template not found for: .\play-scala-seed
So how can I make sbt new use a local directory for a g8 template?
I'm running Windows (if that matters!)
When you use giter8 directly you just need to refer to your local template with the file:// prefix:
g8 file://play-scala-seed
As mentioned by #volia17, you can find it in the giter8 documentation: Testing templates locally.
But when you use sbt new, you need you template name (folder) to end with .g8. sbt can accept different types of templates and this way it knows that this is a giter8 template. So you can rename your template folder to play-scala-seed.g8:
sbt new file://play-scala-seed.g8
P.S. Using giter8 directly is much faster, because sbt new takes time to start (it loads global sbt plugins every time).

Perl .bundle files

On my OSX machine, deep within a jungle of lib directories, I was able to see this
-r-xr-xr-x 1 user users 45700 Feb 01 1:47 LibXSLT.bundle*
1) What are these .bundle files ?
2) Who creates them ? CPAN modules ?
3) If so, then can we control its generation via some Makefile artifact ?

Eclipse Neon searching for shared libraries in the root folder

I installed Eclipse Neon yesterday and it seemed to be working fine. Installed a few plug-ins and did some work.
Today when I start it I get the following error message:
$ /usr/local/bin/eclipse46
/root/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444: cannot open shared object file: Permission denied
I found some references in the config.ini file to the root folder (I have no idea why). I have correct these and the file now looks like:
#This configuration file was written by: org.eclipse.oomph.p2.internal.core.AgentImpl
#Tue Jul 26 16:10:00 CEST 2016
org.eclipse.update.reconcile=false
eclipse.p2.profile=_opt_eclipse.neon_eclipse
osgi.instance.area.default=#user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.10.102.v20160118-1700.jar
equinox.use.ds=true
eclipse.buildId=4.6.0.I20160606-1100
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.200.v20160504-1450.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.200.v20160504-1419.jar,reference\:file\:org.eclipse.wst.jsdt.nashorn.extension_1.0.0.v201605131737.jar
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=#config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench
However, I am still getting the "permission denied" error. Is there any way of correcting this?
I tried to put my user's folder to eclipse.ini file, and this didn't worked.
--launcher.library ~/.p2/pool/plugin /org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
seems the best approach for now is to copy the folder inside root home to your user, once its create with the the new installer.

I had installed perl module, parse::recdescent, still I m getting module not installed error

I m trying to create charts for excel from perl script.
I have perl 5.22 version.
I installed perl module parse-recdescent.
I can verify its presence in my Unix box with the command instmodsh.. And I can see this module installed.
I had successfully set the path for perl5lib.
But still when my script comes at chart->add_series() function, its failing with error below
The Parse::recdescent module must be installed in order to write an excel formula at line x
I had installed this module same as all other modules which works fine.
All paths looks correct...
Please help me.
Update:
Error message: "The Parse::RecDescent module must be installed in order to write an Excel formula at charts4.ps line xxx
Here you can see i installed perl modules and Parse::RecDescent is there. I used instmodsh command...
Installed modules are: Parse::RecDescent
i am using PERL5LIB to set the paths of all modules..
my PERL5LIB looks like below:
/home/xxx/perl/Parse-RecDescent-1.967013/blib/lib/Parse
and you can see .pm is there in this path
$ cd /home/xxx/perl/Parse-RecDescent-1.967013/lib/Parse
$ ls -ltr total 440 -rw-r--r-- 221678 Sep 27 12:28 RecDescent.pm
FYI - This unix box has already a perl installed.. but i had installed my own version. and when i type perl -v it is giving my own version.. perl 5 vesrion 22 as expected. and i had installed many modules in the same way and all are working fine. except this... Want to know whats going wrong?
i am using PERL5LIB to set the paths of all modules..
my PERL5LIB looks like below:
/home/xxx/perl/Parse-RecDescent-1.967013/blib/lib/Parse
and you can see .pm is there in this path
$ cd /home/xxx/perl/Parse-RecDescent-1.967013/lib/Parse $ ls -ltr
total 440 -rw-r--r-- 221678 Sep 27 12:28 RecDescent.pm
Some weirdness here. You say that you have installed Parse::RecDescent, but this doesn't look like an installed version. This looks like a directory that is used as part of the installation process, not the final result. How did you install the module?
But despite the fact that this isn't really where you should be using this module from, it should still work if you set PERL5LIB correctly. You have an extra Parse on the end of your directory. As the module is in Parse/RecDescent.pm the correct value for PERL5LIB will be /home/xxx/perl/Parse-RecDescent-1.967013/blib/lib/.
I really recommend that you install this module properly.