Hi all,
Can anyone point me at a sample bit of code for using the REST API in vSphere 6.5 to create a new VM. Not PowerCLI, but using Invoke-RestMethod or Invoke-Webrequest.
I can authenticate with vCenter and GET the VM list etc, but my POSTs aren't working and I'm apparently making Bad Requests.
Thanks in Advance
Chris
I've cracked the PowerShell/ REST API issues I was having above.
I've done an initial write up of "what worked for me" on my blog in case it's useful to anyone else: http://isjw.uk/powershell-and-rest-api-create-vm/
I've cracked the PowerShell/ REST API issues I was having above.
I've done an initial write up of "what worked for me" on my blog in case it's useful to anyone else: http://isjw.uk/powershell-and-rest-api-create-vm/