Forum Discussion
cgaines22_14499
Mar 24, 2016Nimbostratus
This builds 1 new Pool and puts 1 new Node in that Pool. Invoke-RestMethod and Invoke-WebRequest both work one returns more information in the final output. The node did not receive the description so I will have to keep on working on that part.
Invoke-RestMethod -Method POST -Uri "https://10.5.183.4/mgmt/tm/ltm/pool" -Credential $mycreds -Body '{"name":"cpg-pool2","partition":"CL-COM_SELFSERV","members":[{"name":"10.5.183.199:80","address":"10.5.183.199","description":"Web server"}]}' -Headers @{"Content-Type"="application/json"}