Hello All,
we have device that's wrongly presented for about 200 hosts, we need to disable to device to un-present from SAN side.
How can i run : esxcli storage core device set --state=off -d <NAA ID> this command pCLI.
any recommendations greatly appreciated.
Thank you,
Veldi.
Try like this.
Note1: it assumes you are running PowerCLI 6.3 R1
Note2: it assumes that by "hosts" you mean ESXi hosts
$arguments = @{
device = 'naa.60050768018085af1800000000000024'
state = 'off'
}
foreach($esx in Get-VMHost){
$esxcli = Get-EsxCli -VMHost $esx -V2
$esxcli.storage.core.device.set.Invoke($arguments)
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This worked perfect, Thank you LucD.