Forum Discussion
cgaines22_14499
Nimbostratus
Mar 22, 2016PowerShell Help with JSON and Invoke-WebRequest
This is the F5
$MyLTM_IP = '10.5.183.4'
Load the SnapIn first
Add-PSSnapIn iControlSnapIn
Need to create Login
$secpasswd = ConvertTo-SecureString 'password1' -AsPlainText -Force$m...
cgaines22_14499
Nimbostratus
Mar 24, 2016This 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"}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects