Hi Ben,
If you're working with a single connection, connections are transitive:
connect-nacontroller SIM1; get-navol
will list on the volumes on controller SIM1. I can keep using other cmdlets without specifying the -Controller, and SIM1 will be used; until I connect to another controller that is. Now if you're working with more than one controller, I suspect you'd like to put the connection objects in a collection. Something like this simplistic example:
[object[]]$Simulators=$null;foreach ($SIM in @("SIM1", "SIM2", "SIM3")) {$NewSIM=Connect-nacontroller $SIM;$Simulators=$Simulators+$NewSIM}
Now that you've created a "connection collection", I also suspect you'd like to do something creative with it. Perhaps you'd like to set some option on a group of controllers or list all the snapshots or volumes on a the controllers in your connection. Sadly we don't accept pipeline for -Controller today, but perhaps you could use the foreach-object which does, something like:
$Simulators | foreach-object -Process {get-navol -Controller $_}
Which returns all the volumes on all three members of my "connection collection".
Happy Scripting
J