Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

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

Tags: powershell, git

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\"