VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Error deleting NMP SATP RULE

Hi,

I am unable to delete the nmp satp rule as I am getting error. Please help!!

$esxcli.storage.nmp.satp.rule.list.Invoke() | where {$_.vendor -eq "Nimble"}

ganapa2000_0-1671553494153.png

 

Get-VMHost "myesx12" | ForEach-Object -Process {
$esxcli = Get-EsxCli -VMHost $_ -V2
$Nimble = @{
satp = 'VMW_SATP_ALUA'
psp = 'NIMBLE_PSP_DIRECTED'
vendor = 'Nimble'
options='disable_action_OnRetryErrors'
RuleGroup='user'
}
$esxcli.storage.nmp.satp.rule.remove.Invoke($Nimble)
}

 

I am getting the below errors

ganapa2000_1-1671553567124.png

 

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try like this

Get-VMHost -Name 'myesx12' | ForEach-Object -Process {
    $esxcli = Get-EsxCli -VMHost $_ -V2
    $esxcli.storage.nmp.satp.rule.list.Invoke() |
    where { $_.vendor -eq "Nimble" -and $_.RuleGroup -eq 'user'} |
        ForEach-Object -Process {
            $nimble = @{
              vendor = $_.Vendor
              model = $_.Model
              psp = $_.DefaultPSP
              satp = $_.Name
              pspoption = $_.PSPOptions
            }
            $esxcli.storage.nmp.satp.rule.remove.Invoke($nimble)
        }
    }

 


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Try like this

Get-VMHost -Name 'myesx12' | ForEach-Object -Process {
    $esxcli = Get-EsxCli -VMHost $_ -V2
    $esxcli.storage.nmp.satp.rule.list.Invoke() |
    where { $_.vendor -eq "Nimble" -and $_.RuleGroup -eq 'user'} |
        ForEach-Object -Process {
            $nimble = @{
              vendor = $_.Vendor
              model = $_.Model
              psp = $_.DefaultPSP
              satp = $_.Name
              pspoption = $_.PSPOptions
            }
            $esxcli.storage.nmp.satp.rule.remove.Invoke($nimble)
        }
    }

 


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

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

That worked. Thank you LucD.

0 Kudos