function Isx86
To test if a system is x64, use this approach:{switch([IntPtr]::Size){4{$true}8{$false}}}
Another way to approach it:function Isx64{switch([IntPtr]::Size){4{$false}8{$true}}}
Much more complex tricks can be done, but, these are good to know about.function Get-ProcessorBitWidth{switch([IntPtr]::Size){2{return 16}4{return 32}8{return 64}}}