Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 250391

Re: Get-Content PowerCLI to apply IOPS settings on all LUNs

$
0
0

You could read the WWN into an array and then use the Contains operator to check if the current device belongs to your list of targets.

Something like this

 

$wwn=Get-Content-PathC:\WWN.txt
$esxHosts
=Get-VMHost-Location$mycluster|SortName
foreach
($esxin$esxHosts) {    $esxcli=Get-EsxCli-VMHost$esx
    $esxcli.storage.nmp.device.list() |where {$wwn-contains$_.Device}|%{        $esxcli.storage.nmp.psp.roundrobin.deviceconfig.set($null,$_.Device,1,"iops",$null)      } }

Viewing all articles
Browse latest Browse all 250391

Trending Articles



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