I'm having trouble mapping and unmapping luns with PowerShell. When I try I get an API error. Is there a minimum version of DataONTAP that is required for these cmdlets to work with? Right now I'm on 22.214.171.124 with plans to go to 7.3.3.
Just for kicks, I upgraded my mirror target filer to 7.3.3 and tried this again and it didn't work. Below is the command and the error that I'm getting. I'm connected to the filer using RPC, and can execute other commands against the filer except the add and remove nalunmap commands. I can run a get-nalunmap command just fine, just can't manipulate the mapping.
If you're using RPC, then you shouldn't need to use the -Controller switch when connected to a single controller. If, however, you are connected to multiple controllers and wish to direct commands to different ones, try something like this:
$Filer6 = Connect-NaController Filer6
Add-NaLunMap ... -Controller $Filer6
(Don't forget the $ sign on the controller variable).
Yes, you may connect (via RPC or HTTP) to any number of controllers in a script, saving the result of each connection in a variable. Then just pass the variable as the argument of -Controller in any of the Toolkit's cmdlets. It's common to operate with multiple systems when dealing with clusters, SnapMirror, SnapVault, etc. Some of the example scripts posted here by others show this.