AtlasOS uses a comprehensive scripting system located inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Atlas-OS/Atlas/llms.txt
Use this file to discover all available pages before exploring further.
AtlasModules to configure and optimize Windows. The system combines PowerShell modules, utility scripts, and batch files to provide modular functionality.
Script Organization
Scripts are organized in the following structure:Script Types
PowerShell Modules
Reusable modules that provide functions for system configuration. Modules are imported using:initPowerShell.ps1 script automatically imports all modules and sets up the PowerShell environment.
Utility Scripts
Standalone scripts for specific tasks:- File associations
- Package installation
- Taskbar customization
- Service configuration
- User setup
Script Wrappers
Wrapper scripts inScriptWrappers/ directory that call core functionality:
- ConfigVBS.ps1
- DebloatSendToContextMenu.ps1
- DefaultPowerSaving.ps1
- DisableFileSharing.ps1
- DisablePowerSaving.ps1
- EnableFileSharing.ps1
- InstallSoftware.ps1
- RemoveEdge.ps1
- TelemetryComponents.ps1
- ToggleDefender.ps1
- UpdateDrivers.ps1
Execution Model
Privilege Elevation
Scripts that require administrative privileges useRunAsTI.cmd to elevate to TrustedInstaller/SYSTEM:
Initialization
Most PowerShell scripts start with:- All modules are loaded
- Execution policy is set
- Common functions are available
Error Handling
Scripts follow these error handling patterns:Common Patterns
Registry User Iteration
Many scripts iterate over all user registry hives:Batch File Execution
Batch files use temporary PowerShell executables to bypass User Choice Protection Driver (UCPD):Silent Execution
Scripts support silent execution for automation:Integration with Playbook
Scripts are called from AME Wizard playbook YAML files:Best Practices
- Always use absolute paths - Use
[Environment]::GetFolderPath()instead of hardcoded paths - Initialize PowerShell - Call
initPowerShell.ps1at the start of scripts - Handle elevation - Use
RunAsTI.cmdfor TrustedInstaller privileges when needed - Error reporting - Track error and warning levels
- User interaction - Support
/silentor-NoInteractionflags - Logging - Output informative messages with color coding