PowerShell scripts for detecting and inventorying Dell WD-19S and WD-19DC docking stations on Windows devices, designed for deployment via Microsoft Intune.
These scripts provide multiple detection methods for Dell WD-19 series docking stations:
- Dell Command | Monitor WMI classes (most reliable)
- USB device enumeration with VID/PID matching
- Thunderbolt device detection
- Dell WD-19S - USB-C docking station
- Dell WD-19DC - Dual USB-C docking station
Comprehensive detection script with multiple output formats.
Features:
- Multiple detection methods with automatic fallback
- Verbose logging for troubleshooting
- Flexible output formats (Object, JSON, Text)
- Error handling and status reporting
Usage:
# Basic usage - returns object
.\Get-DellDockInfo.ps1
# JSON output for parsing
.\Get-DellDockInfo.ps1 -OutputFormat JSON
# Text output for display
.\Get-DellDockInfo.ps1 -OutputFormat Text
# Include all Dell docks (not just WD-19 series)
.\Get-DellDockInfo.ps1 -IncludeAllDocks
# Enable verbose logging
.\Get-DellDockInfo.ps1 -VerboseLightweight detection script for Intune Proactive Remediations.
Exit Codes:
0- Dock detected (compliant)1- No dock detected or error (non-compliant)
Output: Outputs JSON to stdout containing detection results.
Remediation script that writes dock information to registry.
Registry Location:
HKLM:\SOFTWARE\Dell\DockInventory
Registry Values:
LastDetection- Timestamp of last detectionComputerName- Device nameDockCount- Number of docks detectedDockModel- Primary dock modelDockSerialNumber- Primary dock serial numberDockFirmware- Firmware version (if available)DetectionMethod- Method used for detectionAllDocks- JSON array if multiple docks detected
Vendor ID: 0x413C (Dell Inc.)
Product IDs:
- WD-19S:
0xB06E,0xB06F - WD-19DC:
0xB0A0,0xB0A1
Dell Command | Monitor Classes:
- Namespace:
root\DCIM\SYSMAN - Class:
DCIM_DockingDevice - Properties:
Model- Dock model nameSerialNumber- Dock serial numberFirmwareVersion- Current firmware versionStatus- Connection statusDeviceID- Unique device identifier
Standard Windows Classes:
Win32_PnPEntity- For USB device enumerationWin32_USBHub- For additional USB information
- Dell Command | Monitor installed on target devices
- Download from Dell Support website
- Provides most reliable detection method
- Exposes DCIM WMI namespace with dock information
- Windows 10 version 1809 or later
- Windows 11 (all versions)
- PowerShell 5.1 or later
- Dell Latitude or Precision laptop
- WD-19S or WD-19DC dock connected
- Standard user context: Detection works with user permissions
- Administrator context: Recommended for full WMI access and registry writes
Step 1: Create Proactive Remediation
- Navigate to Endpoint Manager > Reports > Endpoint Analytics > Proactive remediations
- Click Create script package
- Configure:
- Name: Dell WD-19 Dock Inventory
- Description: Detects and inventories Dell WD-19S/DC docking stations
Step 2: Upload Scripts
- Detection script: Upload
Intune-DockDetection.ps1 - Remediation script: Upload
Intune-DockRemediation.ps1
Step 3: Configure Settings
- Run this script using logged-on credentials: No (Use system context)
- Enforce script signature check: No (unless you sign the scripts)
- Run script in 64-bit PowerShell: Yes
Step 4: Assign to Groups
- Assign to device groups containing Dell Latitude/Precision laptops
- Set schedule (recommended: Daily)
Deploy as a scheduled task using Intune Configuration Profile.
Step 1: Create PowerShell Script Package
- Navigate to Devices > Scripts > Add > Windows 10 and later
- Upload
Get-DellDockInfo.ps1 - Configure:
- Run script in 64-bit PowerShell: Yes
- Run this script using logged-on credentials: No
- Enforce script signature check: No
Step 2: Create Scheduled Task Create a Configuration Profile with a scheduled task XML that runs the script daily.
For testing or small-scale deployment:
# Copy script to target device
Copy-Item .\Get-DellDockInfo.ps1 -Destination "C:\ProgramData\DellScripts\"
# Run manually
PowerShell.exe -ExecutionPolicy Bypass -File "C:\ProgramData\DellScripts\Get-DellDockInfo.ps1" -OutputFormat JSON
# Schedule with Task Scheduler
$action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-ExecutionPolicy Bypass -File C:\ProgramData\DellScripts\Get-DellDockInfo.ps1"
$trigger = New-ScheduledTaskTrigger -Daily -At 9am
Register-ScheduledTask -TaskName "Dell Dock Inventory" -Action $action -Trigger $trigger -RunLevel HighestAfter remediation runs, query the registry:
Get-ItemProperty -Path "HKLM:\SOFTWARE\Dell\DockInventory"Modify the remediation script to send data to Log Analytics:
# Add to Intune-DockRemediation.ps1
$workspaceId = "YOUR_WORKSPACE_ID"
$sharedKey = "YOUR_SHARED_KEY"
$logType = "DellDockInventory"
# Build JSON payload
$json = @{
ComputerName = $env:COMPUTERNAME
DockModel = $primaryDock.Model
SerialNumber = $primaryDock.SerialNumber
DetectionDate = (Get-Date).ToString('o')
} | ConvertTo-Json
# Send to Log Analytics (requires Send-OMSAPIIngestionFile function)Proactive Remediations report shows device status and output.
Check 1: Physical Connection
# Verify USB devices are detected
Get-PnpDevice -Class USB | Where-Object {$_.Manufacturer -like "*Dell*"}Check 2: Dell Command | Monitor
# Check if DCIM namespace exists
Get-CimInstance -Namespace root -ClassName __NAMESPACE | Where-Object {$_.Name -eq "DCIM"}
# Query dock devices directly
Get-CimInstance -Namespace root\DCIM\SYSMAN -ClassName DCIM_DockingDeviceCheck 3: USB VID/PID
# List all Dell USB devices
Get-PnpDevice | Where-Object {$_.DeviceID -match "VID_413C"}This occurs when using USB enumeration fallback. Solutions:
- Install Dell Command | Monitor for accurate serial numbers
- Check if serial is available in device's DeviceID string
- Query additional WMI classes (Win32_USBHub, Win32_SerialPort)
Run in elevated PowerShell session:
Start-Process PowerShell -Verb RunAs -ArgumentList "-File .\Get-DellDockInfo.ps1"Enable detailed logging for troubleshooting:
.\Get-DellDockInfo.ps1 -Verbose -DebugDockDetected : True
DockCount : 1
DetectionDate : 2025-12-02 14:30:15
ComputerName : LAPTOP-ABC123
Docks : {@{DetectionMethod=DellCommandMonitor; Model=Dell WD-19S; SerialNumber=ABCDEF1234; FirmwareVersion=01.00.15; Status=OK; Connected=True}}{
"DockDetected": true,
"DockCount": 1,
"DetectionDate": "2025-12-02 14:30:15",
"ComputerName": "LAPTOP-ABC123",
"Docks": [
{
"DetectionMethod": "DellCommandMonitor",
"Model": "Dell WD-19S",
"SerialNumber": "ABCDEF1234",
"FirmwareVersion": "01.00.15",
"Status": "OK",
"Connected": true,
"DeviceID": "USB\\VID_413C&PID_B06E\\ABCDEF1234",
"Manufacturer": "Dell Inc."
}
]
}Dell Dock Detection Results
==================================================
Computer: LAPTOP-ABC123
Detection Date: 2025-12-02 14:30:15
Docks Found: 1
Dock Information:
Model: Dell WD-19S
Serial Number: ABCDEF1234
Detection Method: DellCommandMonitor
Connected: True
Status: OK
Firmware: 01.00.15
- Deploy Dell Command | Monitor via Intune to all Dell devices for best results
- Test scripts on a pilot group before full deployment
- Monitor Proactive Remediation reports for detection success rates
- Set appropriate schedule - Daily during business hours recommended
- Use device filters to target only Dell Latitude/Precision devices
- Implement centralized logging for enterprise-wide inventory
- Regular reporting on dock firmware versions for update management
- Scripts run in SYSTEM context for full access
- No sensitive data is collected (only hardware identifiers)
- Registry writes are to HKLM (requires elevation)
- No network connections made by default scripts
- Scripts do not modify dock settings or firmware
Edit the PID arrays in the scripts:
$wd19PIDs = @(
'B06E', # WD-19S
'B06F', # WD-19S (alternate)
'B0A0', # WD-19DC
'B0A1', # WD-19DC (alternate)
'XXXX' # Add new model PID here
)Modify the registry path variable:
$registryPath = 'HKLM:\SOFTWARE\YourCompany\DockInventory'Insert custom logging functions:
function Send-ToLogAnalytics {
# Your custom logging implementation
}For issues or questions:
- Check troubleshooting section above
- Review Intune Proactive Remediation logs
- Test script manually with -Verbose flag
- Verify Dell Command | Monitor installation
v1.0 (2025-12-02)
- Initial release
- Support for WD-19S and WD-19DC models
- Multiple detection methods
- Intune deployment scripts
- Comprehensive error handling
These scripts are provided as-is for use in enterprise environments.