AutopilotCleanup

2.2.0

Bulk removal tool for devices from Windows Autopilot, Microsoft Intune, and Microsoft Entra ID. Features interactive WPF device selection grid, custom app registration support, automatic module installation, serial number validation, real-time deletion monitoring, fast bulk removal with CSV export, direct serial number targeting, parallel API fetching on PowerShell 7+
Bulk removal tool for devices from Windows Autopilot, Microsoft Intune, and Microsoft Entra ID. Features interactive WPF device selection grid, custom app registration support, automatic module installation, serial number validation, real-time deletion monitoring, fast bulk removal with CSV export, direct serial number targeting, parallel API fetching on PowerShell 7+, and WhatIf mode. Just run Start-AutopilotCleanup after importing.
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name AutopilotCleanup -RequiredVersion 2.2.0

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name AutopilotCleanup -Version 2.2.0

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2025. All rights reserved.

Package Details

Author(s)

  • Mark Orr

Tags

Autopilot Intune EntraID DeviceManagement Cleanup MicrosoftGraph Windows Entra DeviceCleanup

Functions

Clear-AutopilotCleanupConfig Configure-AutopilotCleanup Connect-AutopilotGraph Get-AllAutopilotDevices Get-AutopilotDevice Get-EntraDeviceByName Get-GraphPagedResults Get-IntuneDevice Install-RequiredGraphModule Invoke-AutopilotCleanup Invoke-IntuneDeviceSync Invoke-IntuneDeviceWipe Remove-AutopilotDevice Remove-EntraDevices Remove-IntuneDevice Show-DeviceSelectionGrid Start-AutopilotCleanup Test-GraphConnection Test-IntuneDeviceRemoved Wait-ForDeviceWipe Write-ColorOutput

Dependencies

This module has no dependencies.

Release Notes

## 2.2.0
- -SerialNumber parameter for direct device targeting (single or multiple), bypasses the WPF grid
- Parallel API fetching on PowerShell 7+ using thread jobs (Autopilot, Intune, Entra ID fetched concurrently)
- Automatic fallback to sequential fetch if parallel jobs fail
- Progress bars during pagination for large tenant data retrieval

## 2.1.0
- Custom app registration support (Configure-AutopilotCleanup / Clear-AutopilotCleanupConfig)
- Start-AutopilotCleanup module entry point
- Automatic update check from PowerShell Gallery
- Cleaner console UI - replaced heavy box-drawing with minimal section headers

## 2.0.0
- PowerShell module architecture (Public/Private function structure)
- WPF device selection grid with search and multi-select
- Fast bulk removal mode with CSV export
- GroupTag filtering
- Serial number validation
- Real-time deletion monitoring
- WhatIf mode
- Automatic module installation

FileList

Version History

Version Downloads Last updated
2.2.3 5 3/2/2026
2.2.2 4 3/2/2026
2.2.1 5 3/2/2026
2.2.0 (current version) 6 3/2/2026
2.1.0 6 3/2/2026