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...
Mar 22, 2016
Try this if you want to use the iControl snapin:
if ( (Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn"}) -eq $null ){
Add-PSSnapIn iControlSnapIn
}
If you don't want to use TLS1.2, comment the line below
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Authenticate
$Success = Initialize-F5.iControl -Hostname 10.5.183.4 -Username "user1" -Password "password1"
Get an iControl Handle
$F5 = Get-F5.iControl
$Poolname = "/CL-COM_SELFSERV/cpg-pool2"
$Member = New-Object -TypeName iControl.CommonAddressPort
$Member.address = "/CL-COM_SELFSERV/10.5.183.199"
$Member.port = 80
$f5.LocalLBPool.add_member_v2(@($Poolname), @(@($Member)))
/Patrik
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