Powershell - New-DSRDSEntry--Update-DSRDSEntry Link Credential / VPN DVLS configuration
0 vote
Hello Devolutions,
We would like to have the ability to create or update an RDP session via the cmdlet New-DSRDPEntry / Update-DSRDPEntry command, and link an existing credential entry to it.
We also want to configure the default DVLS Gateway in the RDP session using the cmdlet.
Thanks for your help !
Hello,
Apologies for the delayed response.
Regarding the credential linkage, we will add a parameter to accept the credential ID.
For the default DVLS Gateway, I want to confirm your expectations. Would you like the option to edit other properties? If so, could you specify which ones? For instance:
Your feedback will help us determine the best approach for implementation. If you intend to always use the default gateway, set to always connect and close with the session, I can add a simple switch to specify that the default DVLS gateway must be used.
Please let me know your preferences.
Best regards,
Maxime
Hello,
We would like to have the ability to create or update an RDP session via the cmdlet New-DSRDPEntry / Update-DSRDPEntry command, and link an existing credential entry to it.
Two new parameters have been added to the New-DSRDPEntry and Update-DSRDPEntry cmdlets:
Here is an example demonstrating how to link an existing entry:
$entryToLinkID = 'some-id' $entryToUpdateID = 'another-id' Update-DSRDPEntry -EntryID $entryToUpdateID -CredentialMode CredentialEntry -LinkedCredentialValue $entryToLinkID
We also want to configure the default DVLS Gateway in the RDP session using the cmdlet.
No new parameters have been added to the DSRDPEntry cmdlets for configuring the default DVLS gateway, as I aimed to avoid introducing too many parameters. Additionally, no new cmdlet has been created to handle the VPN/Tunnel/Gateway configuration, since this would be excessive for simply setting the default DVLS gateway.
For a specific configuration, the recommended approach is:
Here is a simple PowerShell example to set the default DVLS gateway:
$entryID = 'some-id'
$entry = Get-DSEntry -EntryID $entryID
$entry.data.vpn = @{
application = [Devolutions.RemoteDesktopManager.VPNApplication]::DevolutionsGateway
closeMode = [Devolutions.RemoteDesktopManager.VPNCloseMode]::OnDisconnect
devolutionsGatewayID = '6ccf937c-7a98-4106-b951-815471ec649b'
mode = [Devolutions.RemoteDesktopManager.VPNMode]::AlwaysConnect
enableAutoDetectIsOnlineVPN = 2
}
Update-DSEntryBase -JsonBody (ConvertTo-Json -InputObject $entry -Depth 10)
This approach leverages the existing configuration mechanisms without the need for additional cmdlets.
Should you require further examples or have suggestions for new cmdlets, feel free to reach out.
Best regards,
Maxime