問題タブ [powershellget]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
powershell - PowerShellGet を使用して PowerShell モジュールをインストールした後にプロファイル ファイルに書き込む
2 つのコマンドレットを備えたカスタム PowerShell モジュールがあります。成功しましたが、手動で自分のマシンに展開しました。ただし、バイナリ ファイルとモジュール マニフェストをある場所に配置し、モジュールを登録することでデプロイしました。Import-Module
また、「すべてのユーザー」プロファイルにコマンドを手動で書き込む必要もありました。
これで、このモジュールを でデプロイできると確信しましたが、ステートメントをプロファイル ファイルに書き込むにはPublish-Module
どうすればよいでしょうか?Install-Module
Import-Module
docker - Get-PSRepository、powershell 警告: WindowsServer2016 に Docker をインストールしようとしているときに「モジュール リポジトリが見つかりません」
Dockerをインストールしたいので、以下のコマンドを試してみましたが、エラーが発生しました
PS C:\Windows\system32> Install-Module -Name DockerMsftProvider PackageManagement\Install-Package : 指定された検索条件とモジュール名 'DockerMsftProvider' に一致するものが見つかりませんでした。Get-PSRepository を試して、利用可能なすべての登録済みモジュール リポジトリを表示します。C:\Program Files\ WindowsPowerShell\ Modules\ PowerShellGet\ 1.0.0.1\ PSModule .psm1:1772 char:21 $null = PackageManagement\Install-Package @PSBoundParameters CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage ) [Install-Package]、例外 + FullyQualifiedErrorId : NoMatchFoundForCriteria、Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Install-Module -Name DockerMsftProvider -Repository PSGallery -Forceでも同じエラーが発生しました。
以下のリソースを試しましたが、それでも同じです。PSRepository を登録できません。これがインストールされている場合にのみ、Docker を Windows Server にインストールできます。これを解決するのに何時間も費やしましたが、まだ進行状況は 0% です。PSRepository の登録 ( Register-PSRepository -Default -InstallationPolicy Trusted ) はエラーなしでうまくいきましたが、まだ表示されていません。
これを解決するための助けはありますか?
https://copdips.com/2018/05/setting-up-powershell-gallery-and-nuget-gallery-for-powershell.html
https://www.powershellgallery.com/packages/PowerShellGet/2.2.1