microsoft / microsoft/powerbi-powershell

Unable to install cmdlets. "Unable to read file...to calculate its hash."

Open
#247 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C#
Stars
413
Forks
134
Avg merge
33m
Merged PRs (30d)
1

Description

Hello,

Running through the installation instructions...link

  • Open PowerShell as Admin
  • Run Install-Module -Name MicrosoftPowerBIMgmt
  • Accept PSGallery untrusted repository message with a Y
  • Cmdlets start to load then...
  • Error:
PackageManagement\Install-Package : Unable to read file C:\Users\me\AppData\Local\Temp\442391038\MicrosoftPowerBIM
gmt.Data\lib\netstandard2.0\Microsoft.PowerBI.Common.Api.dll to calculate its hash.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : UnableToReadFileToHash,Microsoft.PowerShell.Commands.TestFileCatalogCommand,Microsoft.Po
   werShell.PackageManagement.Cmdlets.InstallPackage

I have .NET 4.7.2 installed already...

image

How can I get past this?

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the documented Install-Module -Name MicrosoftPowerBIMgmt command in an elevated PowerShell session and capture the failure involving Microsoft.PowerBI.Common.Api.dll. Start with the PowerShellGet\PSModule.psm1 location and line 1809 shown in the error, then determine why TestFileCatalogCommand cannot read the extracted DLL. Done means the module installs successfully without the hash-reading error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.