F5 Sites
  • F5.com
  • F5 Labs
  • MyF5
  • NGINX
  • Partner Central
  • Education Services Portal (ESP)
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
GroupsEventsSuggestionsHow 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 05, 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
Mayur_Kirtani_3's avatar
Mayur_Kirtani_3
Icon for Nimbostratus rankNimbostratus
Feb 09, 2017

Do I need special permissions in F5 to be able to run PS commands?

I am able to get a session

PS C:\Windows\system32> $F5session = New-F5Session -LTMName 192.168.XXX.XXX -LTMCredentials $mycredentials -Passthrough

PS C:\Windows\system32> $F5session

Name
BaseURL
WebSession
----
-------
----------
192.168.XXX.XXX
https://192.168.XXX.XXX/mgmt/tm/ltm/
Microsoft.PowerShell.Commands.WebReq...

but when I try get-pool, i get this

PS C:\Windows\system32> Get-Pool $F5session
Invoke-RestMethodOverride : "401 F5 Authorization Required: Authorization failed:
user=https://localhost/mgmt/shared/authz/users/Mayur.Kirtani resource=/mgmt/tm/ltm/pool verb=GET
uri:http://localhost:8100/mgmt/tm/ltm/pool/ referrer:10.XXX.XXX.XXX sender:10.XXX.XXX.XXX
At C:\windows\system32\windowspowershell\v1.0\Modules\F5-LTM\Public\Get-Pool.ps1:32 char:21
+             $JSON = Invoke-RestMethodOverride -Method Get -Uri $URI -WebSession  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-RestMethodOverride

am i missing something?

thanks M

Help guide the future of your DevCentral Community!

What tools do you use to collaborate? (1min - anonymous)

ABOUT DEVCENTRAL

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

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesTraining & Certification

SUPPORT

Manage SubscriptionsProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

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