I need to turn off one of the FC switch for maintenance. To turn off the switch smoothly, I want to set the manual path selection mode and switch all datastores to the second switch. I have a lot of datastores, so I wanted to create a csv file in which I could see invofrmation to be sure that I did not miss anything: For example:
Host | Datastore | Active Target
192.168.1.2 | DS-01 | 21:00:00:1b:32:8f:d0:a5
Unfortunately, all that I found on the Internet and tried to do it myself is to get HBAName, Target and State. I dont know how to comapre HBAName like "vmhba1:C0:T4:L1" with Identifier of Datastore and convert this to Datastore Name in one csv file.
I tried to rewrite these examples:
https://code.vmware.com/forums/2530/vsphere-powercli#569333 https://communities.vmware.com/thread/462782