Start-Transcript -Path C:\$([Environment]::Is64BitProcess).txt
"Is 64?"
[Environment]::Is64BitProcess
$pwd
if ([Environment]::Is64BitProcess)
{
$a = Get-BitLockerVolume -MountPoint C:
$a | Out-File C:\file.txt -append
}
else
{
$arguments = "-ExecutionPolicy Bypass -NoProfile -File temp.ps1 "
start-process C:\WINDOWS\sysnative\WindowsPowerShell\v1.0\powershell.exe -ArgumentList $arguments -Wait -WorkingDirectory $pwd
}
I know its not pretty, but its a proof of running 64 powershell. In essence, I need the 32bit to launch a 64bit version of powershell. Can’t just run powershell.exe because it goes still into x86.