The NetApp that I am running this against has a single spare in it. Why does this command not return any data? It works accurately when I run it against systems with more spares. I don't think is a zero based issue because the count is accurate on all our other systems.
Since you only have one spare, PowerShell treats the output as a single object rather than a collection, so there isn't a "count" method. Measure-Object is a great way to count or otherwise measure the object(s) piped into it.
I thought I'd share what I finished with. I doubt the drive count is the most elegant solution but it works for me. I wanted to loop through the filers and get a count of all the spares on each system. Here is the code;