Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It takes two lines but is easier to use and read than the alternative:

(Get-wmiobject win32_operatingsystem).OSarchitecture

The latter would require entering the entire line to access the property. If you only need the one property then

$Bitness = (Get-wmiobject win32_operatingsystem).OSarchitecture

is better to use as it stores the string found in "OSarchitecture" instead of storing the whole object.

...