Closed officialh1 closed 5 years ago
Hi,
From Remove-NSxEdgeSatticRoute example, missing a Get-NsxEdgeStaticRoute
.EXAMPLE
Remove all routes to 1.1.1.0/24 from ESG Edge01
PS C:\> Get-NsxEdge Edge01 | Get-NsxEdgeRouting | Get-NsxEdgeStaticRoute | where-object { $_.network -eq '1.1.1.0/24' } | Remove-NsxEdgeStaticRoute
Oops, forgot a layer.
get-nsxEdge | Get-NsxEdgeRouting | Remove-NsxEdgeStaticRoute Should remove all static routes from all edge routers, but it fails with this error:
`Remove-NsxEdgeStaticRoute : Cannot validate argument on parameter 'StaticRoute'. XML Element specified does not contain a type property. At line:1 char:36
Obviously something like this would fail as well:
get-nsxEdge | Get-NsxEdgeRouting | Where {$_.staticrouting.staticroutes.route.network -eq "0.0.0.0/0"} | Remove-NsxEdgeStaticRoute