Skip to content

Stensel8/WinDeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinDeploy - Windows Deployment Automation

Open-source Windows 11 deployment automation toolkit built with PowerShell 7

License: MIT PowerShell 7.0+ Windows 11 25H2

Security scanning Validate scripts CodeQL Dependabot Updates

Zero-touch Windows deployment with automatic driver updates, application installation, bloatware removal, and system configuration. Deploy via USB, network, RMM agents, or AutoUnattend.xml.

Deployment options

Local USB / AutoUnattend.xml Intune / Autopilot
Deploy locally via USB, autounattend.xml, or one-liner script. Deploy via Intune Autopilot, targeting specific user groups.
Get started - Local Get started - Intune
View deployment screenshots
Deployment Start Successful Completion
Deployment start Deployment success

Quick Start

Prerequisites: Windows 11 Pro 25H2+, PowerShell 7, internet connection

Option 1: USB Deployment (Fresh installs)

  1. Create bootable Windows 11 USB
  2. Copy autounattend.xml to USB root
  3. (Optional) Copy RMM agent as Agent.exe to USB root
  4. Boot from USB with network connected. Keep USB connected until deployment completes.
  5. Wait. Everything happens automatically.

Option 2: Direct Execution

# Run as Administrator in PowerShell 7
iex (irm "https://raw.githubusercontent.com/Stensel8/WinDeploy/$((irm https://api.github.com/repos/Stensel8/WinDeploy/releases/latest).tag_name)/Scripts/Start.ps1")

Option 3: One-liner

# Run as Administrator in PowerShell 7
iex (irm windeploy.stensel.nl)

How It Works

graph TD
    A[Start.ps1] --> B{Admin Rights?}
    B -->|No| C[Auto-Elevate]
    C --> D{PowerShell 7?}
    B -->|Yes| D
    D -->|No| E[Install PS7 + WinGet]
    E --> F[Relaunch in PS7]
    D -->|Yes| G[Download Deploy.ps1]
    F --> G
    G --> H[Launch Deploy.ps1]
    H --> I[Install RMM Agent]
    I --> J[Update Drivers]
    J --> K[Windows Hardening]
    K --> L[Install Applications]
    L --> M[Remove Bloatware]
    M --> N[Apply Theme]
    N --> O[Set Hostname]
    O --> P[Install Windows Updates]
    P --> Q[Complete]
Loading

Start.ps1 ensures PowerShell 7 and WinGet are available, handles elevation, and downloads Deploy.ps1. Deploy.ps1 orchestrates the deployment by downloading and executing each script in sequence.


Configuration

Customize Application List

Edit Scripts/Deployment/Install-Applications.ps1 (lines 20-30):

$Applications = @(
    "Microsoft.VCRedist.2015+.x64",
    "Microsoft.Office",
    "Microsoft.Teams",
    # Add your apps here
)

Customize Bloatware List

Edit Scripts/Deployment/Remove-Bloat.ps1 (lines 15-40):

$BloatwareList = @(
    "Microsoft.BingNews",
    "Microsoft.GamingApp",
    # Add packages to remove
)

Configure RMM Agent Installation

Place your agent installer as Agent.exe (or any *agent*.exe) on the USB drive root. The script detects and installs it silently during deployment. Works with any RMM solution that supports silent installation (e.g., /S switch).

Supported Devices (Drivers & Firmware)

  • Dell: Latitude, OptiPlex, Precision, XPS series
  • HP: EliteBook, ProBook, EliteDesk, ProDesk, ZBook series

Logging

All operations are logged to C:\WinDeploy\Logs\:

  • Start.log. Main entry point log.
  • Install-Drivers.log, Install-Applications.log, etc. Per-script logs.

View logs in real-time:

Get-Content "C:\WinDeploy\Logs\Start.log" -Wait -Tail 20

Dependencies

WinDeploy automatically installs and manages all dependencies:

Dependency Source Purpose
winget-install PowerShell Gallery Reliable WinGet installation by asheroto
PSWindowsUpdate PowerShell Gallery Windows Update automation
Dell Command Update WinGet Dell driver management
HP Image Assistant WinGet HP driver management

Troubleshooting

Script blocked by execution policy

Set-ExecutionPolicy Bypass -Scope Process

Windows Spotlight not working after deployment

# Run as Administrator
& "C:\WinDeploy\Download\Fix-Spotlight.ps1"

Then set lock screen to "Windows Spotlight" in Settings > Personalization > Lock screen.

WinGet not found

# Run as Administrator
Install-Script winget-install -Force
winget-install

Drivers not installing

  • Confirm internet connection
  • Check device is a supported Dell or HP model
  • Review C:\WinDeploy\Logs\Install-Drivers.log

Applications failing to install

  • Run winget --version to verify WinGet works
  • Use winget search <app-name> to verify the correct package ID
  • Check C:\WinDeploy\Logs\Install-Applications.log
  • If default ID fails, try the msstore source version:
    1. Run winget search <app-name>
    2. Find entries with Source: msstore
    3. Or find the App ID at apps.microsoft.com

Finding the msstore App ID


Credits

Contributing & Support

Contributions welcome. See CONTRIBUTING.md.

Disclaimer

Provided "as is" without warranty. Test in a safe environment before production use.