Windows Junction Manager
A portable PowerShell 7 tool and interactive terminal UI for managing Windows directory junctions (reparse points).
5 modules and 24 actions, driven by one shared catalog.
Windows Junction Manager creates, inspects, repairs, cleans, exports and restores junctions while keeping protected system and user-profile compatibility paths untouched. Every mutating action supports a dry-run preview.
What it does
| Area | Capability |
|---|---|
| Discovery | Scan standard locations or any custom directory, inspect one junction, summarize health |
| Lifecycle | Create, retarget with rollback, repair and remove junctions |
| Cleanup | Remove orphaned links, empty-target links, or both, with optional empty-target reclamation |
| Inventory | JSON/CSV export, timestamped backup snapshots, import preview and guarded restore |
| Safety | Protected-path policy, dry-run everywhere, confirmation for destructive headless actions |
How the pieces fit
flowchart TD
A["JunctionManager.bat<br/>PATH pwsh launcher"] --> B["JunctionManager.ps1<br/>root entry point"]
B --> C["src/menu.ps1<br/>CLI dispatcher + TUI"]
C --> D["src/core/manifest.ps1<br/>load-order manifest"]
D --> E["version.ps1"]
D --> F["paths.ps1"]
D --> G["junctions.ps1"]
D --> H["operations.ps1"]
D --> I["inventory.ps1"]
D --> J["catalog.ps1"]
D --> K["logger.ps1"]
D --> L["ui-helpers.ps1"]
C --> M["TUI surfaces"]
C --> N["Headless CLI"]
M --> O["5 modules / 24 actions"]
N --> O
Junction status model
stateDiagram-v2
[*] --> Active: target exists and contains files
[*] --> StaleOrphaned: target directory missing
[*] --> StaleEmpty: target exists but contains no files
[*] --> Missing: inspected path does not exist
[*] --> NotAJunction: path exists but is not a junction
StaleOrphaned --> [*]: cleanup detaches the link
StaleEmpty --> [*]: cleanup detaches the link, optional target reclaim
Active --> [*]: remove detaches the link, target kept
Quick start
JunctionManager.bat
JunctionManager.bat --list
JunctionManager.bat --scan
JunctionManager.bat --clean-stale --dry-run
Where to go next
- New to the tool? Start with Getting started.
- Prefer the keyboard? See the Interactive TUI.
- Automating a workflow? Use the Command-line reference.
- Concerned about safety? Read Safety and protected paths.
- Extending or testing the tool? Read the Architecture and Core modules guides.
Requirements
- Windows 11
- PowerShell 7.x (
pwsh)
No installation is required. The batch launchers use pwsh from PATH.