VMware Cloud Community
joeg00
Contributor
Contributor

LUN Queue Depth script question

This is more a Host storage question.  I was wondering if you can assist with the below script... It's currently set to edit ALL Hosts but, I want it to only set specific Hosts. Would you know the required syntax to call specific Hosts instead of all the Hosts?

Thanks for your assistance.....   Joe

Connect-VIServer "VcenterName"

# Will set LUN queue depth to 128 on all ESXi under the VC

$ESXisAll = get-vmhost


ForEach ($esxi in $ESXisAll)


{


$esxcli = $esxi| get-esxcli -V2


$args1 = $esxcli.system.module.parameters.set.createArgs()


$args1.parameterstring = "lpfc0_lun_queue_depth=128"


$args1.module = "lpfc"


$esxcli.system.module.parameters.set.invoke($args1)


}

############################################################################

Disconnect-VIServer -Confirm:$false

0 Kudos
3 Replies
joeg00
Contributor
Contributor

Or is there a way to edit the LUN Queue Depth manually?

0 Kudos
daphnissov
Immortal
Immortal

Move to PowerCLI.

0 Kudos
LucD
Leadership
Leadership

You could just adapt the Get-VMHost into

The name field accepts multiple names and or wildcards

$ESXisAll = Get-VMHost -Name esx1.domain

$ESXisAll = Get-VMHost -Name esx1.domain, esx2.domain

$ESXisAll = Get-VMHost -Name esx*


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos