vCenter

 View Only
  • 1.  Rest API from Powershell- Create VM

    Posted Mar 21, 2017 03:47 PM

    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



  • 2.  RE: Rest API from Powershell- Create VM
    Best Answer

    Posted Mar 27, 2017 10:52 AM

    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/