I'm having a problem and I don't understand why it's not working and I'm now wondering if I'm running into some kind of bug and was looking for some suggestions.  If I try the following:-
 
Get-NcVol -VServer ams4-lb8020svm-01 -Name vol_ams4_lbucs_10
or 
$volName = "vol_ams4_lbucs_10"
Get-NcVol -VServer ams4-lb8020svm-01 -Name $volName
 
Both of these works, however if I use the following it doesn't return anything even though the variable is still of a type string:-
 $volName = ($Datastores.VolumeName).ToString()
Get-NcVol -VServer ams4-lb8020svm-01 -Name $volName
  
Output of variable details:-
PS D:\Development\$volName
vol_lhr4_lbucs_01 
 
PS D:\Development\$volname.GetType().Name
String
 
Anyone have any ideas?