-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSetup-DDUX.ps1
35 lines (27 loc) · 1.17 KB
/
Setup-DDUX.ps1
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
<#
.SYNOPSIS
Enables MATLAB DDUX to allow MathWorks to gain insights into how this product is being used.
.DESCRIPTION
The script sets environment variables to enable MathWorks to gain insights into the usage of this product, aiding in the improvement of MATLAB.
It's important to note that your content and information within your files are not shared with MathWorks.
To opt out of this service, simply delete this file.
.EXAMPLE
Set-DDUX
.NOTES
Copyright 2025 The MathWorks, Inc.
The $ErrorActionPreference variable is set to 'Stop' to ensure that any errors encountered during the function execution will cause the script to stop and throw an error.
#>
function Set-DDUX {
Write-Output 'Starting Set-DDUX...'
[Environment]::SetEnvironmentVariable('MW_CONTEXT_TAGS', 'MATLAB:AZURE:PACKERFILE:V1', 'Machine')
[Environment]::SetEnvironmentVariable('MW_DDUX_FORCE_ENABLE', "$true", 'Machine')
Write-Output 'Done with Set-DDUX.'
}
try {
$ErrorActionPreference = 'Stop'
Set-DDUX
}
catch {
$ScriptPath = $MyInvocation.MyCommand.Path
Write-Output "WARNING - An error occurred while running script 'Setup-DDUX': $ScriptPath. Error: $_"
}