VMware Cloud Community
Marco1111
Contributor
Contributor

How to delete external network via powercli?

Hi,

Does anybody know how to  delete an external network via powercli?

Thanks in advance,

Marco

0 Kudos
3 Replies
LucD
Leadership
Leadership

There is this old method in Re: External Networks where you could replace the CreateExternalNet (and adapt the required parameters).

But nowadays it seems much easier with the REST API method DELETE /admin/extension/externalnet/{id}

which you should be able to call with the Invoke-RestMethod cmdlet.


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

0 Kudos
Marco1111
Contributor
Contributor

What should be exactly changed, do you know? I would like to delete the external  NW with powercli.

0 Kudos
LucD
Leadership
Leadership

I'm afraid I don't have a test environment for that handy at the moment.

But with Get-ExternalNetwork you should be able to obtain the info on the external network that you need to make the REST API call I mentioned earlier.


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

0 Kudos