All notable changes to this project will be documented in this file.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
- Pester unit and integration test suite (80% coverage gate before Gallery publish)
Get-RdpAuditLogcmdlet for querying the audit trailExport-RdpSnapshot/Import-RdpSnapshotfor offline snapshot transfer- GitHub Actions CI pipeline (lint → test → build → publish)
- External Pester module dependency declared in manifest
Get-RdpSnapshot -All— includes enforced snapshots in listing (hidden by default)Set-RdpService— now synchronizes Windows Settings UI toggle viaWin32_TerminalServiceSetting.SetAllowTSConnections(WSMan/DCOM/Registry fallback chain)Set-RdpAccessState(private Engine) — CIM-based Remote Desktop access configuration with automatic fallback to registry for restricted environmentsRDPControl.EnforcementResult— typed output forSet-RdpSessionMode -EnabledRDPControl.RestoreResult— typed output forSet-RdpSessionMode -DisabledandRestore-RdpSnapshotRDPControl.SessionModeInfo— typed output forGet-RdpSessionModeRDPControl.SnapshotInfo— typed output forGet-RdpSnapshot- Declarative list formatting for all typed outputs via
RDPControl.format.ps1xml - Timestamps formatted as
yyyy-MM-dd HH:mm:ss UTCacross all output views Undo-Enforcement -SnapshotId— optional parameter for targeted snapshot restoreFind-BinarySignaturenow returnsCurrentBytesproperty — eliminates hardcoded core pattern inSet-RdpSessionMode -DryRun
Get-RdpSnapshot— returns only pre-enforcement snapshots by default. Enforced snapshots are stored internally for integrity validation and are not exposed unless-Allis specifiedRestore-RdpSnapshot— only accepts pre-enforcement snapshots as valid restore points. Error message updated accordinglySet-RdpSessionModeoutput —SnapshotIdrenamed toRestoreSnapshotIdfor semantic clarityGet-SQLiteSnapshot—enforcedcolumn now returned as[bool]instead of[int]Get-SQLiteSnapshot— each record stamped withPSTypeName = RDPControl.SnapshotInfocatchblocks inSet-RdpSessionMode,Invoke-Enforcement,Undo-Enforcementnow use ErrorRecord-aware re-propagation — preservesFullyQualifiedErrorId, category, and target object from engine layer
Initialize-RdpEnvironment -Purge— releases SQLite file locks beforeRemove-ItemviaSQLiteConnection.ClearAllPools+GC.CollectWrite-BinaryByteoutput leaking intoInvoke-Enforcementreturn value — suppressed with| Out-NullGet-SQLiteSnapshotcolumn list built with-joininstead of string concatenation — fixes malformed SQL when-IncludeBlobwas usedGet-BinaryVersionreturning object instead of string inInvoke-Enforcement— fixed by accessing.NormalizedVersionTest-EnforcementState—$targetPathmoved outsidetryblock; genericcatchwrapper removed to preserve original exception types
0.1.0 — 2026-05-05
Initialize-RdpEnvironment— creates the%ProgramData%\RDPControldirectory tree, writesenvironment.json, and initializes the SQLite schema. Supports-Force(repair) and-Purge(full reset with confirmation).Get-RdpEnvironment— reads and returns the current environment configuration. Supports-Strictfor full path validation.Assert-RdpEnvironment(private) — validates the environment is initialized before any cmdlet executes.
Get-RdpPort— reads the current RDP listening port from the registry.Set-RdpPort— changes the RDP port, optionally updates the firewall rule, and restarts TermService. Supports-SkipFirewall,-Force, and-WhatIf.Get-RdpService— returns the current state of the TermService (Remote Desktop Services).Set-RdpService— enables or disables the Remote Desktop service. Supports-WhatIf. Detects active RDP sessions before disabling to prevent lock-out.Get-RdpSessionMode— returns the current session mode (Standard/Concurrent) and binary integrity hash.Set-RdpSessionMode— configures Standard or Concurrent session mode by applying or reverting binary enforcement. Supports-WhatIf,-Force, and-DryRun.
Set-RdpSessionMode -DryRun— analyzes the target binary and returns aRDPControl.DryRunResultobject without applying any changes. Fully pipeline-friendly.RDPControl.format.ps1xml— declarative list view forRDPControl.DryRunResult.RDPControl.types.ps1xml— computed propertiesIsApplicableandRequiresSnapshot, alias propertiesCurrentandTarget, andDefaultDisplayPropertySet.
Add-RdpUser— adds a user or group to the Remote Desktop Users local group. Accepts array and pipeline input. Skips existing members.Get-RdpUser— lists members of the Remote Desktop Users local group viaGet-LocalGroupMember.Remove-RdpUser— removes a user or group from the Remote Desktop Users local group. Accepts array and pipeline input.
Get-RdpSession— enumerates active and disconnected RDP sessions via the WTS API.Disconnect-RdpSession— disconnects a session by ID without logging it off. Supports-WhatIf.Stop-RdpSession— logs off a session by ID. Supports-WhatIf.
New-RdpSnapshot— captures a SHA-256 snapshot of the target binary and stores it in the SQLite database. Detects duplicate hashes (idempotent).Get-RdpSnapshot— queries stored snapshots, optionally filtering by ID or returning only the latest.Remove-RdpSnapshot— deletes a snapshot by ID. Blocks removal of the last snapshot while enforcement is active.Restore-RdpSnapshot— restores the target binary from a stored snapshot. Supports restore by ID or from the most recent snapshot.
Start-RdpWatchdog— registers a Windows Scheduled Task (\RDPControl\RDPControl Watchdog) triggered by Windows Update events (Event ID 19/20) to re-apply enforcement automatically. Runs asSYSTEM.Stop-RdpWatchdog— unregisters the watchdog scheduled task.Get-RdpWatchdogStatus— returns the current registration state and last run time of the watchdog task.
- SQLite-backed store with
System.Data.SQLite— dual-runtime support (net46for Windows PowerShell 5.1,netstandard2.0for PowerShell 7+), with native interop DLLs forx64andx86. - Store Core/Provider pattern —
Store\Coredefines domain contracts,Store\Providers\SQLiteimplements persistence. Provider is replaceable without touching Core or public cmdlets. RDPControl.PrivilegeScope(C# / P/Invoke) — RAII privilege scope forSeTakeOwnershipPrivilegeandSeRestorePrivilege, ensuring deterministic privilege rollback.RDPControl.NativeMethods/RDPControl.TokenPrivilegeManager— internal Win32 interop layer (advapi32).- Audit trail — every state-changing operation writes a record to the SQLite audit table.
PSScriptAnalyzerSettings.psd1— strict ruleset covering security, compatibility, documentation, and formatting.- Build pipeline —
tools\Invoke-Pipeline.ps1orchestrating lint, validation, test, build, and publish. Blocks publish when-SkipTestsis active (80% coverage required).
Get-RdpUsermigrated from legacy ADSIWinNT://provider toGet-LocalGroupMember— ~7x faster, eliminates COM/RPC overhead.Find-BinarySignatureoptimized withArray.IndexOffor fast native byte scanning — significantly faster on large binaries. Logic moved toendblock to guarantee single execution regardless of pipeline input.
- UNIQUE constraint violation on duplicate snapshot hash —
New-StoreSnapshotnow returns the existing snapshot ID instead of failing. Find-BinarySignatureexecuting multiple times when called via pipeline — resolved by moving search logic to theendblock.