Forum Discussion

Ukiman1014's avatar
Ukiman1014
Brass Contributor
May 18, 2023
Solved

Cannot Use Newer Version of PowerShellGet in PowerShell 5.1.

I need to install the prerelease commands for MgGraph.  To do that I need to use the -allowprerelease parameter for Install-Module, which requires a newer version of PowerShellGet than 1.0.0.1, which...
  • Ukiman1014's avatar
    May 19, 2023

    The issue was that the X86 path was before the 64-bit one when I looked at $env:PSModulePath. (There was actually another path in there pointing to my documents folder - no idea where that came from.) So I reset $env:PSModulePath, making sure the 64-bit path was first (I just removed the others), and I'm all set.

     

    So basically because I'm running 64-bit PowerShell, it was installing commands to the 64-bit path, but the environment variable was looking in the x86 folder first.  I'm sure all of this had to do with old stuff I had done with PowerShell.

Resources