Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to create a new session with New-F5Session #238

Open
AndrewSav opened this issue Feb 28, 2024 · 0 comments
Open

Not possible to create a new session with New-F5Session #238

AndrewSav opened this issue Feb 28, 2024 · 0 comments

Comments

@AndrewSav
Copy link

Expected: New-F5Session works
Observed: New-F5Session produces a error
Steps to reproduce:

$password = 'redacted'
$userName = 'redacted'
$targetServer = '192.168.200.101'
$tokenLifespan = 36000

Import-Module F5-LTM
$secpasswd = ConvertTo-SecureString $password -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($userName, $secpasswd)
New-F5Session $targetServer -LTMCredentials $cred -Default -TokenLifespan $tokenLifespan

Exception: /home/asavinykh/.local/share/powershell/Modules/F5-LTM/1.4.338/Public/New-F5Session.ps1:83
Line |
 83 |  …               Throw ("The specified LTM name $LTMName is not valid.")
    |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | The specified LTM name 192.168.200.101 is not valid.

Additional notes: This seems to be due to a change in the bowels of PowerShell since Powershell 7.4. The module seems to work if you chuck -ContentType 'application/json' in the middle of this line, but the error handling here should be improved because the error message is misleading and wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant