hi, I have been using this script flawlessly on my ESXi 5.5 hosts.:
http://www.vmspot.com/disable-esxi-fibre-ports-using-powercli/
However it just stopped working on my ESXi 6 host
i did some debugging and found that the output of Get-ScsiLunPath command is different on the new host.
$Scsipaths=$scsilun|Get-ScsiLunPath|Where-Object {$_.Name -Like"*$WWN*"}
The correct value should be like 5.5 host:
fc.xxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxx-fc.xxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxx-naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:Active
However it is getting:
vmhba65:C0:T0:L71:Active
Therefore the command is not able to parse the variable and results in failure:
Set-ScsiLunPath-ScsiLunPath$Scsipath-Active$false
Please help if anyone knows a solution to it. Thanks in advance.