Forum Discussion
Cannot Use Newer Version of PowerShellGet in PowerShell 5.1.
- 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.
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.