
Deploying ControlUp Edge DX Agent with custom bundles for Amazon WorkSpaces Personal and Amazon WorkSpaces Pools
Using the configuration options in this walkthrough, you can automatically install the ControlUp Edge DX Agent in your custom bundle. This method can be used for any agent that requires a registration process in custom bundles.
- Download the Windows agent from your Edge tenant.
- Make a note of the Tenant Name and the Device Registration Code.
- (optional) Get a beverage of your choice.
- (optional) Create a launch script
- Save the agent configuration script in the custom image
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Requires -RunAsAdministrator
# Configuration
$SourceDirectory ="C:\ControlUp"
$LogFile = "$SourceDirectory\WorkspacesCheck.log"
try {
if ([bool]((Get-itemproperty -Path "HKLM:\SOFTWARE\Avacee\SIP").DeviceRegistrationCode)) {
if (Test-Path $LogFile) {
Remove-Item $LogFile -force
}
Add-Content -Path "$LogFile" -Value "$(Get-Date) - Edge agent installed, my work here is done"
exit
}
} catch {
try {
if ((Get-itemproperty -Path "HKLM:\SOFTWARE\Amazon\WorkSpacesConfig").ProvisioningCompletedEventLogged -eq 1) {
Add-Content -Path "$LogFile" -Value "$(Get-Date) - WorkSpace provisioned"
}
} catch {
# not provisioned yet, go about your day, nothing to see here
exit
}
}
# Edge Agent installation settings
# Get these values from your edge tenant Windows Agent install view
$MSIFileName = "agentmanagersetup.msi"
$MSIPATH = "$SourceDirectory\$MSIFileName"
$DEVREGCODE = "[YOUR-DEVREGCODE]"
$TENANT = "[YOUR-TENANT]"
# This is optional, you do you for grouping. This is an example of taking a WorkSpaces' internal region name as the device’s default group
$GROUP = (Get-itemproperty -Path "HKLM:\SOFTWARE\Amazon\WorkSpacesConfig").InternalRegion
# Run the install script -
$Arguments = "/i", "`"$MSIPath`"", "/qn", ("DEVREGCODE="+$DEVREGCODE), ("TENANT="+$TENANT), ("GROUP="+$GROUP), "ALLUSERS=1","/L*V+", $LogFile
Add-Content -Path "$LogFile" -Value "$Arguments - Action performed"
Start-Process -FilePath "msiexec.exe" -ArgumentList $Arguments -PassThru
Add-Content -Path "$LogFile" -Value "$(Get-Date) - Action performed, have a nice day"
- (optional ) Create a schedule task to run on startup
- Complete other configuration tasks, and save the custom image
- Create a custom bundle using the custom image
- Deploy a WorkSpace with the custom bundle and validate the configuration.
1
msiexec /i c:\controlup\agentmanagersetup.msi /qn DEVREGCODE=your-device-registration-code TENANT=your-tenant-name ALLUSERS=1 GROUP=your-pool-name
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"SessionStart": {
"executables": [
{
"context": "system",
"filename": "c:\\controlup\\setup.bat",
"arguments": "",
"s3LogEnabled": true
},
{
"context": "user",
"filename": "",
"arguments": "",
"s3LogEnabled": true
}
],
"waitingTime": 30
},
"SessionTermination": {
"executables": [
{
"context": "system",
"filename": "",
"arguments": "",
"s3LogEnabled": true
},
{
"context": "user",
"filename": "",
"arguments": "",
"s3LogEnabled": true
}
],
"waitingTime": 30
}
}