VMware Cloud Community
jtfox76
Contributor
Contributor

PowerShell Invoke-RestMethod to create org/vdc.

I want to try and build a re-usable PoweShell script to create a vCD ORG, VDC, vAPP, Edge GW and program the edge GW NAT and FW rules. I would like to use the API since it seems like the way things are moving versus powercli. Does anyone have an example similar to the blog below? I know the blog is writing with powercli in mind. I am looking for some example with PowerShell using the Invoke-RestMethod and VDC API.

Automating creation of vCD Organizations, Users and Org vDCs - VMware PowerCLI Blog - VMware Blogs

0 Kudos
1 Reply
vMarkusK1985
Expert
Expert

Take a look at my PowerShell Module:

GitHub - mycloudrevolution/VMware-vCD-Module: initial creation of VMware vCloud Director Objects lik...

But I did not use RestAPI natively... But it works fine for me.

Why do you want to use RestAPI?

Some vCD RestAPI Examples with PowerShell can be found here:

GitHub - mycloudrevolution/Grafana-Telegraf-vCloud-PsCore: This is PowerShell (Core) script is used ...

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos