F5 Sites
  • F5.com
  • LearnF5
  • NGINX
  • MyF5
  • Partner Central
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
Groups
EventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

PowerShell module for the F5 LTM REST API

Problem this snippet solves: To report an issue with the F5-LTM or F5-BIGIP modules, please use the Issues sections of the GitHub repos (here and here) instead of commenting here. Thanks! This Pow...
Updated Jun 06, 2023
Version 2.0
devops
iControlREST
LTM
microsoft powershell with icontrol
powershell
Joel_Newton's avatar
Joel_Newton
Icon for Cirrus rankCirrus
Joined September 06, 2012
View Profile
HLS_35586's avatar
HLS_35586
Icon for Nimbostratus rankNimbostratus
Oct 31, 2016

Would you please update the document to include the correct process for establishing the connection? Powershell doesn't use parentheses when passing parameters. While the comments section is helpful, a newbie (like myself) would have thought the document as displayed was correct.

`Function F5-Connect {

if ( (Get-Module | Where-Object { $_.Name -eq "F5-LTM"}) -eq $null ) {

    Write-error "'F5-LTM' is not installed on this computer."
    Exit

} else {

     Connect to the F5 Load Balancer using the predefined credentials for node management

    $myhost = 'myf5.mycompany.com'
    $myuser = 'f5adminusername'
    $mysecpass = ConvertTo-SecureString "f5adminpassword" -AsPlainText -Force
    $mycreds = New-Object System.Management.Automation.PSCredential $myuser, $mysecpass
    $SessionToken = New-F5Session -LTMName $myhost -LTMCredentials $mycreds -Passthrough
}

Return $SessionToken

} `

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesF5 CertificationLearnF5 Training

SUPPORT

Manage SubscriptionsProfessional ServicesProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

F5 logo©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information