Sorry, this probably isn't going be much help but I've tried your code against one of our volumes which has dedupe enabled and the output looks to be correct and consistent with ontap. This was against 8.0.3.
Powershell output: 985
I've tried setting the snapshot reserve to various amounts to see if that was somehow throwing the output, it didn't make any difference, but then I wasn't really expecting it to.
Have you tried breaking down the output a little and checking the output on a per snapshot basis? Something like:
What I was going to suggest was check the verbose output against System Manager, so you get a view of each snapshot and the cumulative total. I was hoping that might give you an indication of where the output was differing from ontap.
I don't think dedupe should be skewing the output. Certainly when I ran that code the figures returned reflected the dedupe savings. What version of ontap are you running? Just thinking something in the API may have changed between versions.
Just to throw another curve ball get-nasnapshotreclaimable (unfortunately this method is too slow if I was to use it across all filers) displays a different snapshot size (more consistent with df -g) than what is displayed in the get-nasnapshot and system manager!!