One GUI to find and remove device records across Intune, Entra ID, and Autopilot in minutes, not hours.
Device cleanup is messy in real environments.
- Records live across multiple Microsoft portals.
- Device naming is inconsistent.
- Stale, duplicate, or orphaned records break admin workflows.
- Manual cleanup is slow and error-prone.
Remove Device Everywhere gives IT admins a single PowerShell GUI to search and remove matching records across:
- Microsoft Intune
- Microsoft Entra ID (Azure AD)
- Windows Autopilot
You search once, review results, confirm, and clean up from one place.
Single Device Search:
- GUI-first workflow (no day-to-day terminal usage required)
- Exact search by device name or serial number
- Multi-source results in one grid (Intune, Entra, Autopilot)
- Removal Preview to see what will be deleted before action
- Optional linked cleanup by serial/Azure device ID
- Remove selected items or Remove All Found
- Bulk mode using CSV input
- Built-in CSV audit logging for traceability
This tool performs permanent deletions.
- Every removal action requires confirmation.
- Use the preview and confirmation dialog carefully.
- Validate search results before clicking remove.
Install-Script -Name Remove-DeviceEverywhere -Scope CurrentUserThen run:
Remove-DeviceEverywhere.ps1- Clone or download this repository.
- Open PowerShell in the project folder.
- Run:
Set-ExecutionPolicy -Scope Process Bypass
.\Remove-DeviceEverywhere.ps1- Launch the script.
- Click Connect Graph and complete sign-in.
- Search by exact device name or serial.
- Review found records and preview.
- Remove selected records (or remove all found).
- Check audit log output.
Graph delegated permissions requested:
DeviceManagementManagedDevices.ReadWrite.AllDeviceManagementServiceConfig.ReadWrite.AllDirectory.AccessAsUser.All
Required admin roles depend on scope, typically:
- Intune Administrator
- Cloud Device Administrator
- Or another role with equivalent delete rights
Every delete attempt is written to CSV in AuditLogs.
Each row includes:
- Timestamp
- Operator
- Search term
- Source system
- Device identifiers
- Outcome (Deleted/Failed)
- Message
This gives you a clean operational trail for change tracking and review.
Bulk Operations:
Bulk mode accepts CSV input (for device names or serials).
- Load CSV
- Search all rows
- Review consolidated results
- Remove in controlled batches
Ideal for large cleanup jobs and migration waves.
- Windows PowerShell 5.1 or PowerShell 7 on Windows
- Internet access to Microsoft Graph
- Rights to install
Microsoft.Graph.Authenticationfor current user - Account with appropriate Graph permissions and directory roles
- Tenant cleanup after pilot/test devices
- Migration projects with duplicate records
- Removing stale hybrid/AAD-joined leftovers
- Autopilot and Intune record cleanup before re-enrollment
Issues and pull requests are welcome.
- Keep changes focused.
- Add/update tests when behavior changes.
- Prefer clear admin-focused UX and safe defaults.
MIT License. See LICENSE.
Stop cleaning devices manually across multiple portals.



