Can someone please confirm whats the correct Base & Auth URL in New-F5Session.ps1

Hi All, I do have device IP, userName & Password with me. But as soon as i tried to hit the REST API in (new-F5Session.ps1) it throws unauthorized access at both BaseURL & Auth URL:

$BaseURL = “https://$LTMName/mgmt/tm/ltm/” $AuthURL = “https://$LTMName/mgmt/shared/authn/login”

Script I am referring here is :https://github.com/vercellone/POSH-LTM-Rest/blob/master/F5-LTM/Public/New-F5Session.ps1

Line No. 21 & 27.

Though if i directly access to https://$LTMName/tmui/login.jsp it works perfectly well and i can login.

Please guide me.

Thanks

Please Note: PS version is v5 installed on my box.

Have you set -LTMName correctly to the device name or IP address? Take a look at GitHub - vercellone/POSH-LTM-Rest: PowerShell module and scripts for working with F5's LTM REST API · GitHub which gives you some examples