function Isx86
To test if a system is x64, use this approach:{switch([IntPtr]::Size){4{$true}8{$false}}}
function Isx64{switch([IntPtr]::Size){4{$false}
10pt;"> 8
{
$true
}
}
}
Another way to approach it: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}}}