But it does not work. The command will return successful but it doesn't actually take any action. Its got the inputs I'm after but the command just doesn't make any changes. I'm working my way through the cmdlets Get-NcExportRule & Remove-NcExportRule but I'm having trouble figuring out how I would reference the rule index for the Remove-NcExportRule cmdlet based on what Get-NcExportRule returns. In my environment I would only have one clientmatch IP per policy so any match for that client in the named policy would have the correct index.
Hmm, not quite going to work for me. See, I'm dealing with WFA in a web services way so I need WFA to be able to glean the rule index based on the client IP in a given policy. There is no way the service calling WFA will know the rule index - it knows the cluster, vserver, export policy, & client IP only. Given that in my environment there is only one rule for a given client IP per policy I though it would be easy for WFA to glean this but not sure yet...
Re: How to remove an existing export rule from an existing policy in CDOT?
Ok, that is an easy change. I ran into an issue where I duplicated rules (not a good practice but it was someone else's SVM) so I made the change. Instead, Change the Remove Export Rule command definition to use the Search for option and leverage the attached Filter.
This will return the specific client match from the policy. The Rule Index is returned