PowerShell Script Parameter not working with RDM Variable $VPN_HOST$
We are attempting to use a parameter to pass the $VPN_HOST$ RDM variable value to an embedded PowerShell script entry. The PowerShell script entry is set for local execution. The script entry was added as a Before Opening event of a NetExtender VPN connection. The $VPN_HOST$ RDM variable value is not passed to the script.
If I put a fixed text into the parameter tab for the server parameter, the text is passed to the script.
we want to pass the value as a parameter so that the PowerShell script can be digitally signed.
We are using RDM 2025.2.23.0. Is there another method we should be using?
param(
[string]$Server
)
Write-Host "server: " $Server
# Define base path and the exact server value to match
$baseKey = "HKLM:\SOFTWARE\SonicWall\SSL-VPN NetExtender\Standalone\Profiles"
# Loop through each subkey under Profiles
Get-ChildItem -Path $baseKey | ForEach-Object {
$serverValue = Get-ItemProperty -Path $_.PSPath -Name server -ErrorAction SilentlyContinue
if ($serverValue.server -eq $server) {
Write-Host "Deleting key: $($_.Name)" -ForegroundColor Yellow
Remove-Item -Path $_.PsPath -Recurse -Force
}
}
<img
alt="Parm.png"
width="524"
src="https://forum-api.devolutions.net/api/messages/217009/attachments/Parm.png"
>Parm.png
Hello TS,
Thank you for reaching out to the Devolutions support team.
I can easily reproduce this issue with 3 or 4 vpn configurations.
It is not related to the parameter, but to the variable itself.
You can test this with the Event -> before open -> message prompt.
I will open an internal ticket.
Best regards,
Patrick Ouimet
8c1e34eb-0c78-4ed8-8a21-7d56f9a8c812.png
Thank you for the help. I am eagerly awaiting a fix.
This issue has become more critical for us than initially anticipated. do you know when a fix for this bug will be available?
Hello,
Thank you for this feedback.
Regrettably, the Support Department cannot provide an exact release date as the full process (Build – Quality Assurance – Release) is out of our control.
The development team needs to implement a fix. After that a series of events must take place:
- A pull request must be approved, by a peer primarily, but sometimes also by a security specialist;
- A build must be generated;
- The whole build contains typically many fixes, which each must be validated by our QA department
- if need be, the build is rejected for a specific issue, or a combination thereof, which would trigger another build cycle
I have shared your comment in the internal ticket.
Best regards,
Patrick Ouimet
Hello,
A fix for this issue will be included in version 2025.2.28.0.
Regards
Jonathan Del Signore