param( [switch]$ResetPrusa, [switch]$ClearOnLogout, [string]$TargetUser, [string]$Material = "PLA" ) # Makerspace Manager # Version: 2.0.0 # Build Date: 13/09/2026 21:27 $SCRIPT_VERSION = "2.0.0" $global:policiesJson = @' [ { "id": "chkReg", "name": "Registry Editor", "category": "System", "description": "Prevents users from launching regedit.exe or modifying system registry settings.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "name": "DisableRegistryTools", "type": "DWord", "value": 1 } ] }, { "id": "chkControl", "name": "Settings & Control Panel", "category": "System", "description": "Prevents users from accessing Windows Settings app and Control Panel.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "NoControlPanel", "type": "DWord", "value": 1 } ] }, { "id": "chkInstall", "name": ".MSI Software Installations", "category": "System", "description": "Blocks installation of MSI software packages.", "keys": [ { "path": "Software\\Policies\\Microsoft\\Windows\\Installer", "name": "DisableMSI", "type": "DWord", "value": 1 } ] }, { "id": "chkCmd", "name": "Command Line (CMD/PS/Terminal)", "category": "System", "description": "Blocks Command Prompt, PowerShell, and Windows Terminal.", "keys": [ { "path": "Software\\Policies\\Microsoft\\Windows\\System", "name": "DisableCMD", "type": "DWord", "value": 2 }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "DisallowRun", "type": "DWord", "value": 1 }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "1", "type": "String", "value": "powershell.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "2", "type": "String", "value": "pwsh.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "3", "type": "String", "value": "wt.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "4", "type": "String", "value": "cmd.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "5", "type": "String", "value": "WindowsTerminal.exe" } ] }, { "id": "chkTaskMgr", "name": "Task Manager", "category": "System", "description": "Disables Task Manager (Ctrl+Shift+Esc / Ctrl+Alt+Del).", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "name": "DisableTaskMgr", "type": "DWord", "value": 1 } ] }, { "id": "chkNoDisp", "name": "Display Settings", "category": "System", "description": "Prevents changing display resolution and monitor options.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "name": "NoDispCPL", "type": "DWord", "value": 1 } ] }, { "id": "chkAdminTools", "name": "Administrator Tools (MMC/EventVwr)", "category": "System", "description": "Blocks MMC consoles, Event Viewer, and administrative utilities.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "DisallowRun", "type": "DWord", "value": 1 }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "10", "type": "String", "value": "mmc.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "11", "type": "String", "value": "eventvwr.exe" }, { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun", "name": "12", "type": "String", "value": "eventvwr.msc" } ] }, { "id": "chkNoRun", "name": "Run Command (Win+R)", "category": "Explorer", "description": "Removes the Run option from Start menu and disables Win+R shortcut.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "NoRun", "type": "DWord", "value": 1 } ] }, { "id": "chkNoWallpaper", "name": "Desktop Wallpaper", "category": "Explorer", "description": "Locks desktop background and prevents user customization.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\ActiveDesktop", "name": "NoChangingWallPaper", "type": "DWord", "value": 1 } ] }, { "id": "chkClearRecent", "name": "Clear Recent Docs on Exit", "category": "Explorer", "description": "Automatically purges recent file list when the user logs off.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "ClearRecentDocsOnExit", "type": "DWord", "value": 1 } ] }, { "id": "chkTaskbar", "name": "Taskbar Settings", "category": "Explorer", "description": "Prevents rearranging taskbar items or changing taskbar properties.", "keys": [ { "path": "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "name": "LockTaskbar", "type": "DWord", "value": 1 } ] }, { "id": "chkEdgePrivate", "name": "Private Browsing Mode (Edge/Chrome)", "category": "Browser", "description": "Forces Edge and Chrome to operate exclusively in Incognito/InPrivate mode.", "keys": [ { "path": "Software\\Policies\\Microsoft\\Edge", "name": "InPrivateModeAvailability", "type": "DWord", "value": 2 }, { "path": "Software\\Policies\\Google\\Chrome", "name": "IncognitoModeAvailability", "type": "DWord", "value": 2 } ] }, { "id": "chkEdgeFav", "name": "Browser Favorites & Bookmarks", "category": "Browser", "description": "Prevents users from adding, editing, or deleting browser bookmarks.", "keys": [ { "path": "Software\\Policies\\Microsoft\\Edge", "name": "EditFavoritesEnabled", "type": "DWord", "value": 0 }, { "path": "Software\\Policies\\Google\\Chrome", "name": "EditBookmarksEnabled", "type": "DWord", "value": 0 } ] } ] '@ $global:presetsJson = @' { "makerspace": { "name": "Makerspace", "description": "Standard lockdown for 3D printing, laser, and design stations. Blocks system settings, CMD, and admin tools while allowing USB file transfer.", "policies": [ "chkReg", "chkControl", "chkInstall", "chkCmd", "chkTaskMgr", "chkNoDisp", "chkAdminTools", "chkNoRun", "chkNoWallpaper", "chkClearRecent", "chkTaskbar", "chkEdgePrivate", "chkEdgeFav" ] }, "gaming": { "name": "Gaming", "description": "Protection for gaming stations. Blocks system settings, regedit, CMD, and installers, but leaves Task Manager open for frozen games and browser logins.", "policies": [ "chkReg", "chkControl", "chkInstall", "chkCmd", "chkAdminTools", "chkNoRun", "chkNoDisp" ] } } '@ $xaml = @'