0 vote
Hello,
We need to roll out an increasing number of Devolutions Gateways. To automate the rollout, we are using the DVLS CLI to install the Devolutions Gateway. At the moment it is not possible or known to me to pass the password for the certificate file encrypted via container or encrypted string.
Would it be possible to implement this in a future version?
Hi,
In order to automate the deployment of a large number of Devolutions Gateway instances, the DevolutionsGateway PowerShell module is the best way to go. It is actually what the DVLS Console (and DVLS CLI) call under the hood anyway.
Unfortunately, it looks like we're lacking proper documentation for the DevolutionsGateway PowerShell module. I've added this to the docs to-do list. In the meantime, I do have one sample using it to install Devolutions Gateway with a pfx for the certificate:
https://github.com/Devolutions/devolutions-labs/blob/master/powershell/gw_vm.ps1#L258
Here's a simplified version of what it does:
$GatewayHostname = "gateway.contoso.local"
$CertificateFile = "certificate.pfx"
$CertificatePassword = "cert123!"
Install-Module -Name DevolutionsGateway
Import-Module DevolutionsGateway
Install-DGatewayPackage
Import-DGatewayCertificate -CertificateFile $CertificateFile -Password $CertificatePassword
Set-DGatewayHostname $GatewayHostname
Set-DGatewayListeners @(
$(New-DGatewayListener 'https://*:7171' 'https://*:7171'),
$(New-DGatewayListener 'tcp://*:8181' 'tcp://*:8181'))
Set-Service 'DevolutionsGateway' -StartupType 'Automatic'
Start-Service 'DevolutionsGateway'
The PowerShell module installs the matching version of Devolutions Gateway by default, unless you provide it with an explicit version number. It's a script module, so you can look at it to figure out more of what it does: https://github.com/Devolutions/devolutions-gateway/blob/master/powershell/DevolutionsGateway/Public/DGateway.ps1
Best regards,
Marc-André Moreau