This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -62,19 +62,17 @@ resource "coder_script" "windows-rdp" {
62
62
63
63
# Install the module with the specified version for all users
64
64
# This requires administrator privileges
65
- Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
66
-
67
- # try {
68
- # # Install-PackageProvider is required for AWS. Need to set command to
69
- # # terminate on failure so that try/catch actually triggers
70
- # Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop
71
- # Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
72
- # }
73
- # catch {
74
- # # If the first command failed, assume that we're on GCP and run
75
- # # Install-Module only
76
- # Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
77
- # }
65
+ try {
66
+ # Install-PackageProvider is required for AWS. Need to set command to
67
+ # terminate on failure so that try/catch actually triggers
68
+ Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop
69
+ Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
70
+ }
71
+ catch {
72
+ # If the first command failed, assume that we're on GCP and run
73
+ # Install-Module only
74
+ Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
75
+ }
78
76
79
77
# Construct the module path for system-wide installation
80
78
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"
You can’t perform that action at this time.
0 commit comments