Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

listing all lunids, perennial reservation setting, etc.

$
0
0

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


Viewing all articles
Browse latest Browse all 175326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>