Hi,
I need to get rid off some old conf from some of the cluster & in that some host where iscsi settings exits.
I am talking about the - Configuration tab - storage adapter - software or hardware iscsi apterter - properties - dy discover/static discover/ netwrk conf ..
1. List it per server
2. Remove it
all i got when google is
Get-IScsiHbaTarget -Address xxx -Type Send | Remove-IScsiHbaTarget
Then i tried some combinations but so desired result. Can someone pls give some scrtipt or cmd for this ?
You can do this per ESXi in the following way
foreach($esx in Get-VMHost){
foreach($hba in (Get-VMHostHba -VMHost $esx -Type iSCSI)){
Get-iSCSI -IScsiHba $hba
}
}
If you need to add Where-clauses or just the Remove-IScsi cmdlet, just pipe the result from the Get-IScsi cmdlet.
An alternative is to go the esxcli path.
You find the iSCSI commands under $esxcli.iscsi after you have done.
$esxcli = Get-EsxCli -VMHost $esx
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for responding LucD
Looks there is some syntax eror
ALso i would like to see the hostname & then the list of Target info ... above will just dump all in one .. can u pls re-check
NM, I got a good link for this
http://ict-freak.nl/2010/10/12/how-to-manage-iscsi-targets-with-powercli-part-2/