When you query the values of a registry key, PowerShell will add a bunch of artifacts to the results. You'll get some new properties that all start with "PS":
Get-ItemProperty $regkey | Select-Object *
You should use -exclude like this to get rid of them:
This will exclude any property starting with "PS." You should try a more precise approach that lists the unwanted property names:
PSParentPath, PSChildName, PSProvider, PSDrive