Forum Discussion

nlongFOG_264986's avatar
nlongFOG_264986
Icon for Nimbostratus rankNimbostratus
Jul 21, 2016

Powershell F5 test-functionality cmdlet error message

Good afternoon; Thought it might be helpful to provide a bit of background we have recently upgraded to version 12.1 on our big-ip firewall. I’m a powershell newbie with the task of creating a powershell script that will enable us to temporary disable and enable pool members belonging to specific pools.

 

In the process of becoming familiar with the f5-ltm cmdlets, have come across the following error which cannot figure out:

 

First did the following: $secpasswd = ConvertTo-SecureString "1234abcd" -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential ("nlong", $secpasswd)

 

Next tested creating session: $F5Session = New-F5session -LTMName 10.20.10.21 -LTMCredentials $mycreds -PassThrough PS C:\Windows\system32> $F5Session Name BaseURL Credential

 

10.20.10.21 https://10.20.10.21/mgmt/tm/ltm/ System.Management.Automation.PSCredential

 

Next attempted to run the test-functionality cmdlet: PS C:\Windows\system32> test-functionality -F5Session $F5Session -testvirtualserver 'fw-bigip-int1' -testvirtualserverip '10.20.10.21' -testpool 'prod_donate_istore_apptier_8550' -poolmember '10.17.4.11'

 

PLEASE NOTE THE FOLLOWING ERROR MESSAGE SNIPPET:

 

Beginning test
  • Get the failover status of the F5 device Invoke-RestMethodOverride : "401 F5 Authorization Required: Authorization failed: user=https://localhost/mgmt/shared/authz/users/nlong resource=/mgmt/tm/cm/failover-status verb=GET uri:http://localhost:8100/mgmt/tm/cm/failover-status referrer:10.20.20.70 sender:10.20.20.70At C:\Users\nlong\Documents\WindowsPowerShell\Modules\f5-ltm\1.3.29\Public\Get-F5Status.ps1:16 char:21
  • ... loverJSON = Invoke-RestMethodOverride -Method Get -Uri $FailoverPage ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-RestMethodOverride

What I don’t understand is where is the cmdlet getting the user=https://localhost:8100…..output. I’m running powershell 5.0 from my windows7 workstation.

 

Any and all input/suggestions are greatly appreciated