We have been using the following scripts on our ESX Vcenter 2.5.u5 server to set the prefered paths on our SAN. It has been running great, now that I try and run it on VSphere it will no longer re port the information as in the past. The line get scsi lun is wrapping on this forum it is one long path in the code.
I am attaching files with the code I use. The screen shots included are the results for both what happens in 2.5 u5 as well as vsphere 4 u1.
What I would like is the same screenshot "style" that I get in vcenter 2.5 in the 4.0 u1.
Any help would be appreciated.
Mike

The script does appear to run the same for me, it's just that in vSphere the fields you are after are significantly longer.
VirtualCenter2.5
Name : vmhba1:0:100 ScsiLunId : HostSystem-host-61257/vmhba1:0:100 LunPath : vmhba1:0:100 SanId : 101:102:117:104:100:123:101:121 State : Active Preferred : True ScsiCanonicalName : vmhba1:0:100
vCenter4.0
Name : fc.5001438000c43f8d:5001438000c43f8c-fc.50060e800476310d:50060e800476310d-naa.60060e80047631000000763100003f46 ScsiLunId : HostSystem-host-489/naa.60060e80047631000000763100003f46 LunPath : fc.5001438000c43f8d:5001438000c43f8c-fc.50060e800476310d:50060e800476310d-naa.60060e80047631000000763100003f46 SanId : 101:102:117:104:100:109:100:116 State : Active Preferred : True ScsiCanonicalName : naa.60060e80047631000000763100003f46
So unless you have a very wide screen you might have trouble get a nice list to display with any truncation.
Try to play with this: Out-File -Width
