Would you please help me get this script to also print the lunID and datastore name please?
$esxihosts = get-cluster Oracle | get-vmhost
foreach ($i in $esxihosts) {
$esxclihost = $i | get-esxcli
$disks = $esxclihost.storage.core.device.list()
#$fcdisks = $disks | where {$_.displayname -match "SP_SQLCLS"}
$fcdisks = $disks
foreach ($d in $fcdisks) {
#$esxclihost.storage.core.device.setconfig($false,$d.device,$true)
$esxclihost.storage.core.device.list() | where {$_.device -eq $d.device} | select device,IsPerenniallyReserved,size
__________________________
script gives:
Device IsPerenniallyReserved Size
naa.6000144000000010705b6e368ce6ff5c false 30720
but I want it to show something like:
Device lunID DataStoreName IsPerennially Reserved Size
naa.6000144000000010705b6e368ce6ff5c 5 Exchange_VMFS_01 false 30720
BTW, credit due to the owner of this blog: http://blog.pipefl.com/
cheers,
KC