Step 2: Deployment

Configure enterprise registry settings, deploy the MSI, verify scheduled tasks, and validate end-to-end telemetry upload.

1. Registry Configuration

All settings are read from a single registry key. Deploy via GPO Preferences, Intune OMA-URI, SCCM, or any registry tool.

Registry Path
HKLM\SOFTWARE\Policies\MDE-Toolkit

1.1 Background Collector

Value NameTypeDefaultDescription
EnableBackgroundCollectorDWORD01 = enable, 0 = off
CollectionIntervalMinutesDWORD480Minutes between collections (min 5)
CacheFolderSZ%ProgramData%\MDE-Toolkit\cacheLocal cache folder
MaxCacheFilesDWORD48Rolling file count
CacheRetentionDaysDWORD30Delete older than N days (0 = no limit)

1.2 Upload: Function App

Value NameTypeDefaultDescription
EnableUploadDWORD01 = enable upload
FunctionAppUrlSZe.g. https://func-mde-toolkit.azurewebsites.net/api/HealthReportIngestion
FunctionAppAudienceSZe.g. api://mde-toolkit-func
UploadIntervalMinutesDWORD480Upload frequency (min 5)
UploadTimeoutSecondsDWORD30HTTP POST timeout (5–300)
UploadRetryCountDWORD2Retries on failure (0–10)

1.3 Upload: Direct Blob Storage (Alternative)

Value NameTypeDefaultDescription
EnableBlobUploadDWORD01 = enable blob upload
BlobStorageAccountNameSZStorage account name
BlobContainerNameSZmde-telemetryContainer name
BlobEndpointSuffixSZe.g. blob.core.usgovcloudapi.net

1.4 Identity / Authentication

Value NameTypeDefaultDescription
TenantIdSZ(auto)Auto-detected from PRT if blank
PreferredAuthMethodSZDefaultDefault | WAM | DeviceCode | ManagedIdentity
AzureEnvironmentSZPublicPublic | USGov | China | Germany

1.5 Data Scope

Control which telemetry categories are collected. All DWORD, 1 = on, 0 = off.

Value NameDefaultDescription
CollectDefenderStatus1RTP, Tamper, Signatures
CollectDefenderPolicies1ASR, NP, CFA, Device Control
CollectFirewallStatus1Domain/Private/Public profiles
CollectFirewallRules0Individual rules (can be large)
CollectDeviceControl1Device Control policies
CollectAppControl1WDAC status
CollectDeviceGuard1VBS, HVCI, Credential Guard
CollectIntuneEnrollment1Intune / ConfigMgr info
CollectSecurityScore0Computed security score

1.6 Tagging / Organization

Value NameTypeDescription
DeviceTagSZFreeform label — e.g. Finance
OrgUnitSZe.g. US-East
EnvironmentSZProduction | Staging | Dev

1.7 UI / Feature Flags

Control the interactive WPF application (not the background collector). All DWORD, default 0.

Value NameDescription
DisableAiFeaturesHide AI analysis panels
DisableExportButtonsHide PDF/JSON export
DisableRemoteTargetPrevent targeting remote machines
ForceReadOnlyModeDisable all write operations

1.8 Example: GPO / Intune Deployment

PowerShell — Set registry for enterprise collection + upload
$regPath = "HKLM:\SOFTWARE\Policies\MDE-Toolkit"
New-Item -Path $regPath -Force | Out-Null

Set-ItemProperty $regPath -Name EnableBackgroundCollector -Value 1 -Type DWord
Set-ItemProperty $regPath -Name EnableUpload             -Value 1 -Type DWord
Set-ItemProperty $regPath -Name FunctionAppUrl      -Value "https://func-mde-toolkit.azurewebsites.net/api/HealthReportIngestion"
Set-ItemProperty $regPath -Name FunctionAppAudience -Value "api://mde-toolkit-func"
Set-ItemProperty $regPath -Name AzureEnvironment -Value "Public"
Set-ItemProperty $regPath -Name DeviceTag -Value "Finance"
Set-ItemProperty $regPath -Name OrgUnit   -Value "US-East"
Set-ItemProperty $regPath -Name CacheRetentionDays -Value 30 -Type DWord

2. MSI Deployment

The MDE Toolkit ships as a WiX v5 MSI installer, suitable for SCCM, Intune, or GPO.

What the MSI Does

Silent Install

Command Line
msiexec /i MDE-Toolkit-3.1.1.msi /qn
msiexec /i MDE-Toolkit-3.1.1.msi /qn /l*v install.log

# Intune detection: HKLM\SOFTWARE\MDE-Toolkit\Version exists

3. Scheduled Tasks

The MSI creates two tasks. Both use -StartWhenAvailable so missed runs catch up when the device comes back online.

Offline resilience. If the machine is asleep or off at the scheduled time, Windows runs the task as soon as it wakes. One catch-up run fires — correct for telemetry.

3.1 Collect (SYSTEM)

PowerShell equivalent
$action    = New-ScheduledTaskAction `
  -Execute '"C:\Program Files\MDE-Toolkit\MDE Monitoring App.exe"' `
  -Argument '--collect --no-upload'
$trigger   = New-ScheduledTaskTrigger -Once -At (Get-Date) `
  -RepetitionInterval (New-TimeSpan -Hours 8)
$principal = New-ScheduledTaskPrincipal `
  -UserId 'SYSTEM' -LogonType ServiceAccount -RunLevel Highest
$settings  = New-ScheduledTaskSettingsSet `
  -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
Register-ScheduledTask -TaskName 'MDE Toolkit Collect' `
  -Action $action -Trigger $trigger -Principal $principal `
  -Settings $settings -Force

3.2 Upload (Interactive User)

PowerShell equivalent
$action    = New-ScheduledTaskAction `
  -Execute '"C:\Program Files\MDE-Toolkit\MDE Monitoring App.exe"' `
  -Argument '--upload'
$trigger   = New-ScheduledTaskTrigger -Once -At (Get-Date) `
  -RepetitionInterval (New-TimeSpan -Hours 8)
$principal = New-ScheduledTaskPrincipal `
  -GroupId 'BUILTIN\Users' -RunLevel Highest
$settings  = New-ScheduledTaskSettingsSet `
  -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
Register-ScheduledTask -TaskName 'MDE Toolkit Upload' `
  -Action $action -Trigger $trigger -Principal $principal `
  -Settings $settings -Force

3.3 Settings Summary

SettingCollectUpload
Run asSYSTEMBUILTIN\Users (interactive)
IntervalEvery 8 hoursEvery 8 hours
StartWhenAvailable
AllowStartIfOnBatteries
WakeToRun
No GUI. Both modes run headless. The WPF window is never created.
User must be logged on. Upload uses interactive logon — deferred via StartWhenAvailable if no session is active.

4. Verification

4.1 Test Collection

PowerShell (Admin)
& "C:\Program Files\MDE-Toolkit\MDE Monitoring App.exe" --collect --no-upload
Get-Content "C:\ProgramData\MDE-Toolkit\cache\latest.json" | ConvertFrom-Json | Select hostname, healthScore, overallStatus

4.2 Test Upload

PowerShell (logged-on user)
& "C:\Program Files\MDE-Toolkit\MDE Monitoring App.exe" --upload
Get-Content "C:\ProgramData\MDE-Toolkit\cache\service.log" -Tail 10

4.3 Verify Tasks

PowerShell
Get-ScheduledTask -TaskName "MDE Toolkit*" | Format-Table TaskName, State, @{N='RunAs';E={$_.Principal.GroupId ?? $_.Principal.UserId}}

4.4 Verify Table Row

Azure CLI
az storage entity query \
  --table-name HealthReports \
  --account-name stmdetoolkit \
  --filter "Hostname eq 'YOUR-PC-NAME'"

4.5 Expected Output

CheckExpected
Exit code0
latest.jsonExists with hostname, healthScore
Service logFunction App upload succeeded (200)
Table rowHealthScore > 0
RegistryHKLM\SOFTWARE\MDE-Toolkit\Version = 3.1.1