This is probably an API enhancement, because it doesn't work with the VisualStudio API either...but...
I'd like to suggest an enhancement to the NaController class, but really to all classes in the NetApp toolkit. When using New-Object -Type NetApp.Ontapi.Filer.NaController, users will receive an error. This is caused by the NaController having no constructors that take zero arguments. This is mostly a problem when using PowerShell scripts that pass variables by reference to functions. To pass a variable by reference, you first have to define its type. There's no way to do this with the NaController class without passing an IP or hostname.
Obvisouly I don't need to use a function to connect to the controller, but it makes my script collection much more re-usable and makes my individual scripts more sensible when looking at the actual body of the script. Plus, it's just good programming practice to define variable types when defining variables...even if the language in use doesn't require it. Right?
Well you've certainly shown me something new. I suspect that [ref] is in PowerShell more for interoperability with other languages (COM, C#) rather than as a PowerShell idiom. I personally would rather see functions that write objects to the pipeline and throw exceptions. If you need to return multiple values, you might consider a hashtable or custom object (maybe built with Select-Object, New-Object).
But I'm not going to tell you not to use it. Instead, I think you just need to declare your variables explicitly like this: