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"}
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
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
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
That worked. Thank you LucD.