Files
usmt-dash/Config/usmt-dash.psd1
T
Johan Sandoval 7868948bfc Presence, AD/SCCM/DNS reasons, monitors, snapshots, new-device priority
Worker: pings every tracked device on a presence sweep (hourly in business
hours plus midnight) and records last online; inventory reports whether a
device was found in AD and SCCM; monitors from WmiMonitorID; snapshots of
the last reachable state replace "Cached"; newly tracked devices are swept
and published first; totals count source devices only; per-type timing in
Worker-State.

Front end: details dialog shows presence, reasons instead of N/A,
"Waiting for worker...", monitors and snapshot times, and refreshes in
place; Custom View gains Days Offline, Last Online, Found In and monitor
columns; manual pair changes show immediately; sync dialog shows timing by
type. Custom View gets a large scrollbar; "Exactly ticked" filter.
2026-10-06 19:09:49 +00:00

140 lines
6.7 KiB
PowerShell

@{
# =====================================================================================
# USMT Dash configuration
#
# Every environment-specific value lives in this file. To adopt the dashboard in your
# own environment, copy this file, fill in the SCCM section, and run the two services:
#
# .\USMT-Worker.ps1 # data collector (keep running)
# .\USMT-Server.ps1 # web server + JSON API (keep running)
#
# Pass -Demo to either script (or set Mode = 'Demo', or env USMT_MODE=Demo) to run
# against the built-in simulated fleet instead of real infrastructure.
# Pass -ConfigPath to point at a different config file.
# =====================================================================================
# 'Live' = query real infrastructure through the provider below.
# 'Demo' = simulated fleet, read-only API, visitor changes stay in the browser.
Mode = 'Live'
# Data source adapter used in Live mode. Loaded from .\Providers\<Provider>.ps1
Provider = 'SCCM'
Server = @{
Port = 8080
# HttpListener prefix. '*' binds every interface (may need a URL ACL on Windows:
# netsh http add urlacl url=http://*:8080/ user=DOMAIN\svc-account)
Prefix = 'http://*:{0}/'
}
Worker = @{
# Seconds between cycles during business hours
CycleSeconds = 180
# Outside business hours the worker sleeps until the next morning, with a
# midnight "pitstop" that runs the daily software/advanced-info refresh.
BusinessHours = @{
Enabled = $true
Start = '07:30'
End = '17:30'
Weekdays = @(1, 2, 3, 4, 5) # 0 = Sunday ... 6 = Saturday
}
# Flush the local DNS client cache at the start of each cycle (Windows only)
FlushDnsEachCycle = $true
# Devices whose admin share hangs; disk and log checks are skipped for these
DiskSkipList = @()
# How long a cached software inventory is considered fresh
SoftwareCacheHours = 24
# A task-sequence log modified within this window counts as "active"
ActiveLogHours = 24
# Every tracked device (including completed pairs and destinations the sweep skips)
# is pinged this often to keep "last online" / "days offline" current. Cycles only run
# in business hours plus the midnight pitstop, so 60 = hourly by day, plus midnight.
PresenceSweepMinutes = 60
}
# -------------------------------------------------------------------------------------
# SCCM / ConfigMgr provider (.\Providers\SCCM.ps1)
# -------------------------------------------------------------------------------------
SCCM = @{
SiteCode = 'ABC'
ProviderMachineName = 'sccm01.corp.example.com' # SMS Provider for the CMSite PSDrive
SqlServer = 'sccm01.corp.example.com' # Site database server
Database = 'CM_ABC'
# Where the worker looks for USMT progress logs on each device (relative to the
# admin share below). First folder containing a matching log wins.
AdminShare = 'C$'
LogFolders = @('Windows\CCM\Logs\SMSTSLog', 'Windows\CCM\Logs')
ScanStateLog = 'scanstateprogress'
LoadStateLog = 'loadstateprogress'
# Many organizations extend hardware inventory with a custom class that holds
# asset/location details (room, department, mount type, ...). Map that class here.
# Set Enabled = $false if you don't have one - those fields will show "N/A".
AssetInventory = @{
Enabled = $true
View = 'v_GS_ASSET_INFO0' # primary inventory view
FallbackView = '' # optional older/secondary view, queried only if the primary has no row
# Dashboard field = column in the view
Columns = @{
Updated = 'Date_Updated0'
Location = 'Location0'
Vanity = 'VanityLocation0'
Department = 'Department0'
Building = 'Building0'
Mount = 'Mount_Type0'
PrimaryUser = 'Primary_User0'
PhoneExt = 'Phone_Extension0'
InfoBy = 'Info_Entered_By0'
Notes = 'Notes0'
}
# Boolean (1/0) columns that describe what kind of space the device is in.
# Any column set to 1 adds its label to the "Room Type" field.
RoomTypes = @(
@{ Label = 'Conference Room'; Column = 'ConferenceRoom0' }
@{ Label = 'Hoteling Desk'; Column = 'HotelingDesk0' }
@{ Label = 'Training Room'; Column = 'TrainingRoom0' }
@{ Label = 'Reception'; Column = 'Reception0' }
@{ Label = 'Shared Space'; Column = 'SharedSpace0' }
)
}
# Attached monitors (count + model names). Needs the WmiMonitorID class enabled in
# hardware inventory (root\wmi). SCCM stores its string properties as comma-separated
# character codes, which the provider decodes. Set Enabled = $false if not collected.
Monitors = @{
Enabled = $true
View = 'v_GS_WMIMONITORID'
NameColumn = 'UserFriendlyName0'
ManufacturerColumn = 'ManufacturerName0'
# Skip the built-in panel of laptops (instance names containing these)
InternalPattern = 'LGD|SDC|BOE|AUO|CMN|SHP'
}
}
# -------------------------------------------------------------------------------------
# Demo provider (.\Providers\Demo.ps1) - simulated fleet used by the public demo
# -------------------------------------------------------------------------------------
Demo = @{
DeviceCount = 200 # tracked source devices seeded at startup
CycleSeconds = 45 # cooldown between cycles (business hours are ignored)
DelayMsPerDevice = 35 # artificial per-device latency so the progress bar moves
LifecycleHours = 24 # how long one simulated migration takes, start to finish
PresenceSweepMinutes = 5 # ping every device this often (Live default is hourly)
Verbose = $true # run the worker with -v style tracing
}
# Console output from both services is mirrored to Data\Logs\*.log as JSON lines so the
# dashboard's terminal panel can stream it.
Logging = @{
Enabled = $true
MaxLines = 3000
}
}