This was a tricky one. I ran through the various LUN commands for clustered Data ONTAP but was not able to find anything solid. However, I did find a post from mbeattie that gives the following example. I havent tried it out personally but looks like it should work.
Import-Module DataONTAP
$cluster = "cluster1.netapp.com"
$vserver = "vserver1"
$lunPath = "/vol/vol1/luns/lun1"
$identifier = "naa.600a0980"
$credentials = $host.ui.PromptForCredential("Connect to cluster $cluster", "Please enter the user name and password","","")
$cluster = Connect-NcController $cluster -Credential($cred)
$lun = Get-NcLun -Vserver $vserver -Path $lunPath -Controller $cluster
$serialNumber = $lun.SerialNumber
$ca = $serialNumber.ToCharArray();
$naasn = $null
Foreach($byte in $ca){
$naasn = $naasn + [System.String]::Format("{0:x}", [System.Convert]::ToUInt32($byte))
}
Write-Host "LunPath,LunSerial,NaaNumber"
Write-Host "$lunPath,$serialNumber,$identifier$naasn"
The output will look like:
LunPath,LunSerial,NaaNumber
/vol/vol1/luns/lun1,BpEwv$ElzqhW,naa.600a0980427045777624456c7a716857