Hi,
sometimes it is importend, when writing to the registry or file system in regions where the architecture redirection active, to known on which version a script runs.
This can be simply that by the size of an integer pointer. The size on 32Bit Systems is 4 Bytes and on 64Bit systems 8 Byte.
1 2 3 4 5 6 7 8 | PS D:\> if ( [System.IntPtr] ::Size -eq 4) { write-host "32 Bit" } else { write-host "64 Bit" } |
Michael