You can use the -Template switch on Get-NcLun to get an empty LunInfo object. Then you set the fields to the values you want to query on the LunInfo object, leaving the other fields null. For example, to get a specific LUN by its serial number:
PS C:\Users\Administrator> $query = Get-NcLun -Template
PS C:\Users\Administrator> $query.SerialNumber = '7T5G6+3iH8Qa'
PS C:\Users\Administrator> Get-NcLun -Query $query
Path Size Protocol Online Mapped Thin Vserver Comment
---- ---- -------- ------ ------ ---- ------- -------
/vol/clusterdisks/disk0 200.0 GB windows_2008 True True True beam01
If you are using PowerShell 3, you can do this in one line:
PS C:\Users\Administrator> Get-NcLun -Query @{SerialNumber='7T5G6+3iH8Qa'}
Path Size Protocol Online Mapped Thin Vserver Comment
---- ---- -------- ------ ------ ---- ------- -------
/vol/clusterdisks/disk0 200.0 GB windows_2008 True True True beam01
You can also build more complex queries, such as this one to get all online, mapped, and thin LUNs that are bigger than 200GB:
PS C:\Users\Administrator> Get-NcLun -Query @{Online=$true; Mapped=$true; Thin=$true; Size=">$(200GB)"}
Path Size Protocol Online Mapped Thin Vserver Comment
---- ---- -------- ------ ------ ---- ------- -------
/vol/clusterdisks/disk0 200.0 GB windows_2008 True True True beam01
/vol/clusterdisks/disk1 1.0 TB windows_2008 True True True beam01
/vol/powershell/luns/cluster 1.0 TB windows_2008 True True True beam01
/vol/powershell/luns/disk0 1.0 TB windows_2008 True True True beam01
-Steven