Automation

 View Only
  • 1.  You cannot call a method on a null-valued expression _ trying to configure multipathing

    Posted 23 days ago

    Trying to set LB-Latency multipathing to hosts :

    $esxihosts = get-cluster CLU | get-vmhost

    foreach ($esxihost in $esxihosts) {

    $esxcli = Get-EsxCli  -VMhost $esxihost -V2

    $hpprule = @{

    description = "Pure Storage FlashArray NVME Rule"

    model = "Pure*"

    type = "vendor"

    vendor = "NVMe"

    rule = "103"

    plugin = "HPP"

    configstring = "pss=LB-Latency,latency-eval-time=180000"

    }

    $esxcli.storage.core.claimrule.add.Invoke($hpprule)

    }

    Error message is "

    Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

    Can you help me troubleshoot ? Thanks



  • 2.  RE: You cannot call a method on a null-valued expression _ trying to configure multipathing

    Posted 23 days ago

    Oh and I apologize, I went past the  error message in the title , forgot to change it .




  • 3.  RE: You cannot call a method on a null-valued expression _ trying to configure multipathing
    Best Answer

    Posted 23 days ago

    The key 'description' is not a valid key.
    You can check which arguments are available with 

    $esxcli.storage.core.claimrule.add.CreateArgs()


    ------------------------------


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


    ------------------------------



  • 4.  RE: You cannot call a method on a null-valued expression _ trying to configure multipathing

    Posted 23 days ago

    I must have dreamt of it . Thank you .