Powershell Command Issue with .58 (Read-LicenseEULA)
Information
Summary: |
Powershell Command Issue with .58 (Read-LicenseEULA) |
Environment: |
Product: LoadMaster Version: 7.2.58 Platform: Any Application: Any |
Question/Problem Description: |
|
Steps to Reproduce: |
$ip = '192.168.x.x'; $port = '443' $cred0 = New-Object pscredential('bal', (ConvertTo-SecureString -String '1fourall' -AsPlainText -Force)) PS C:\Users\>Read-LicenseEULA -LoadBalancer $ip -LBPort $port -Credential $cred0
|
Error Message: | ReturnCode Response ---------- -------- 401 <?xml version="1.0" encoding="ISO-8859-1"?>... |
Defect Number: | LM-1851 |
Enhancement Number: | |
Cause: |
|
Resolution: |
|
Workaround: |
The following workaround can be ran in the meantime while our developers work on a fix:
----------------- PowerShell 5.1 Commands using Kemp PS Module -----------
$ip = '192.168.x.x' $port = '443' $cred0 = New-Object pscredential('bal', (ConvertTo-SecureString -String '1fourall' -AsPlainText -Force)) $rc = (Initialize-LmConnectionParameters -Address $ip -LBPort $port -Credential $cred0).returncode
# Read Eula and collect first magic string $r = (Read-licenseEULA).response.tostring() if ($r -match "Command successfully executed") { $Magic1 = (Read-LicenseEULA).data.eula.MagicString $msg = (date -format u) + " INFO - Read EULA. Magic1 = $Magic1"; $msg }
# Work around for 7.2.58.0 Elseif ($r -match "<Magic>") { $r = ($r | convertfrom-string -Delimiter "/Magic>").P1 $magic1 = $r.Substring(($r.length - 37), 36) $msg = (date -format u) + " INFO - Read EULA. Magic1 = $Magic1"; $msg } Else { $msg = (date -format u) + " ERR - CANNOT COLLECT MAGIC1 FROM EULA. Skipping $ip"; $msg } ------------------------------------------
|
Notes: |