Compare commits

...

2 Commits

Author SHA1 Message Date
Ben Potter
cb075aa035 fix order 2024-06-26 16:44:21 -05:00
Ben Potter
9864408643 fix: aws starter template compatability 2024-06-26 16:34:52 -05:00

View File

@@ -60,9 +60,13 @@ resource "coder_script" "windows-rdp" {
$moduleName = "DevolutionsGateway"
$moduleVersion = "2024.1.5"
# Install the module with the specified version for all users
# This requires administrator privileges
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force -Confirm:$false -SkipPublisherCheck
try {
# Try to import the module directly
Import-Module $moduleName -ErrorAction Stop
} catch {
# If it fails, install and then import the module
# Construct the module path for system-wide installation
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"
@@ -70,6 +74,8 @@ resource "coder_script" "windows-rdp" {
# Import the module using the full path
Import-Module $modulePath
}
Install-DGatewayPackage
# Configure Devolutions Gateway