mtniehaus / AutopilotBranding

MIT License
318 stars 82 forks source link

Autopilot Branding

This repository contains a sample PowerShell script that can be packaged into an Intune Win32 app to customize Windows 10 devices via Windows Autopilot (although there's no reason it can't be used with other deployment processes, e.g. MDT or ConfigMgr).

Capabilities

These customizations are currently supported:

Requirements and Dependencies

This uses the Microsoft Win32 Content Prep Tool (a.k.a. IntuneWinAppUtil.exe, available from https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool) to package the PowerShell script and related files into a .intunewin file that can be uploaded to Intune as a Win32 app.

Building

Run the makeapp.cmd file from a command prompt. (It will not work if you using Terminal.)

Using

Add the resulting Win32 app (.intunewin) to Intune. The installation command line should be:

powershell.exe -noprofile -executionpolicy bypass -file .\AutopilotBranding.ps1

The uninstall command line should be:

cmd.exe /c del %ProgramData%\Microsoft\AutopilotBranding\AutopilotBranding.ps1.tag

The detection rule should look for the existence of this file:

Path: %ProgramData%\Microsoft\AutopilotBranding File or filder: AutopilotBranding.ps1.tag

See https://oofhours.com/2020/05/18/two-for-one-updated-autopilot-branding-and-update-os-scripts/ for more information.

Change history

2023-09-23: Added logic to handle the Windows 11 Start menu proces using Start2.bin; Windows 10 will continue to use Layout.xml. Added additional Windows 11 in-box apps to remove. 2024-01-31: Added additional apps to remove, adding timestamps to log messages, cleaned up error logging. 2024-04-27: Added logic to stop the Start menu from popping up each time a new user signs in.

Suggestions?

If you have suggestions on other customizations that would be useful, contact me at michael@oofhours.com.