I also ran into this issue. I'm running Windows 2012 R2, w/ all latest M$ patches as of 3/1/2017. I need to run builds that use 64bit modules. Note that the $env:psmodulepath doesn't incluse 64 bit module locations. I ran the following commands in a Jenkins build, and here is the output:
$PSHome
C:\Windows\SysWOW64\WindowsPowerShell\v1.0
$PsVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
$env:PSModulePath -Split(';')
WindowsPowerShell\Modules
C:\Program Files (x86)\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\WindowsPowerShell\Modules\
C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules
When I run the same commands in a 64bit PoSH session from the Windows server, Here is what I get:
$PSHome*
C:\Windows\System32\WindowsPowerShell\v1.0
$PsVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
$env:PSModulePath -Split(';')
C:\Users\stona001\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\WindowsPowerShell\Modules\
C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules
I also ran into this issue. I'm running Windows 2012 R2, w/ all latest M$ patches as of 3/1/2017. I need to run builds that use 64bit modules. Note that the $env:psmodulepath doesn't incluse 64 bit module locations. I ran the following commands in a Jenkins build, and here is the output:
$PSHome
C:\Windows\SysWOW64\WindowsPowerShell\v1.0
$PsVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
$env:PSModulePath -Split(';')
WindowsPowerShell\Modules
C:\Program Files (x86)\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\WindowsPowerShell\Modules\
C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules
When I run the same commands in a 64bit PoSH session from the Windows server, Here is what I get:
$PSHome*
C:\Windows\System32\WindowsPowerShell\v1.0
$PsVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
$env:PSModulePath -Split(';')
C:\Users\stona001\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\WindowsPowerShell\Modules\
C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules