0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PowerShell の Install-Module でエラーが発生する「このオブジェクトにプロパティ 'ValidAuthenticodeSignatureInFile' が見つかりません」

Last updated at Posted at 2022-06-08

現象

PowerShell でInstall-Moduleを実行したら以下のようなエラーが発生したインストールに失敗しました。

PackageManagement\Install-Package : このオブジェクトにプロパティ 'ValidAuthenticodeSignatureInFile' が見つかりません。
プロパティが存在することを確認してください。
発生場所 C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 文字:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exce
   ption
    + FullyQualifiedErrorId : PropertyNotFoundStrict,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.Package
   Management.Cmdlets.InstallPackage

発生条件

  • OS:Windows Server 2016(1607)
  • PowerShell バージョン: 5.1.14393.5066
  • PowerShellGet バージョン:1.0.0.1
  • PackageManagement バージョン:1.0.0.1

解決策

Install-Module-SkipPublisherCheckオプションを付与して実行した。

Install-Module <Name> -Force -SkipPublisherCheck

このオプションは以下の場合に使用するもののようなので、非推奨なやり方かもしれません。

既存のモジュールが信頼できる発行元によってデジタル署名されているが、新しいバージョンが信頼できる発行元によってデジタル署名されていない場合です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?