Forum Discussion
Sheela_Narayan_
Nimbostratus
Dec 27, 2015Need help to identify which is the active load balancer from PowerShell cmdlets
Need help to identify which is the active load balancer from PowerShell cmdlets and also need to know if can initiate a sync from an active load balancer to passive load balancer using PowerShell. ...
Joel_Newton
Cirrus
Jan 18, 2016This can also be done via the REST API:
Create your credential object
$username = "myusername"
$secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
$f5device = "mydevicename"
$mycreds = New-Object System.Management.Automation.PSCredential ($username, $secpasswd)
Set the value of the failover page and query it
$FailoverPage = "https://$f5device/mgmt/tm/cm/failover-status"
$FailoverJSON = Invoke-RestMethod -Method Get -Uri $FailoverPage -Credential $mycreds
This is where the failover status is indicated
$FailoverJSON.entries.'https://localhost/mgmt/tm/cm/failover-status/0'.nestedStats.entries.status.description
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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