Installing PsGet: No Valid Module File Was Found in Any Module Directory

The instructions at PsGet.Net failed for me at step 3.

  1. Download PsGet.psm1 from https://github.com/psget/psget/
  2. Copy PsGet.psm1 to your modules folder (e.g. Modules\PsGet\ )
  3. Execute Import-Module PsGet (or add this to your profile)
  4. Enjoy!

Error Message

no valid module file was found in any module directory

Since I had put the PsGet.psm1 module in the documents\windowspowershell\modules\psget\ directory, the fix for me was to add that directory as a “module directory” as follows:

$env:PSModulePath = $env:PSModulePath + ";C:\Users\<the-current-user>\Documents\WindowsPowerShell\Modules\"