PS> echo [environment]::getEnvironmentVariable("PATH", "machine" ) PS> [environment]::setEnvironmentVariable("ANOTHER_VAR", "another value", "machine")
PROCESSOR_ARCHITECTURE
can be used to determine the bitness of the CPU. If it contains x86
(or even x86 Family
), it's a 32 bit processor, if it contains 64 Family
, it's a 64 bit processor.