How to get the bitness of Microsoft Office from the registry?

How is it possible to get the value of the registry storing data on the bitness of the Microsoft office, to be precise, the Outlook. I found the location of the bitness in the registry and tried to get it into a variable with the Get-ItemPropertyValue command

$srp = Get-ItemPropertyValue -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook -Name Bitness

But due to the fact that Bitness is of type reg_sz, I get the error

Get-ItemPropertyValue: Bitness property does not exist in the path.

Please tell me how can I get the value in order to compare it later?


For click-to-run versions you can check another registry path.

$version = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration -Name platform

if($version -eq 'x86'){
    Write-Host The version of office installed is 32 bit.
}
elseif($version -eq 'x64'){
    Write-Host The version of office installed is 64 bit.
}

As you see it's named platform and it returns either x86 or x64