This PowerShell script provides a WPF GUI-based tool that facilitates the offboarding of devices from Microsoft's Intune, AutoPilot, and Azure AD services. The tool leverages Microsoft Graph APIs to authenticate, search, and remove devices.
Intune_Offboarding_Tool.mp4
- Connect to Microsoft Graph
- Search for devices
- Display device information
- Offboard devices from Intune, AutoPilot, and Azure AD
- Microsoft PowerShell 5.1 or later
- Necessary modules:
- Microsoft.Graph.Identity.DirectoryManagement
- Microsoft.Graph.DeviceManagement
- Microsoft.Graph.DeviceManagement.Enrollment
These modules will be installed automatically if not present, but you need to have administrative permissions. Instructions
- Clone this repository or download the script.
- Open PowerShell.
- Navigate to the directory containing the script.
- Run the script by typing .\Get-IntuneOffboardingTool.ps1 .
- Connect to Microsoft Graph: Click the "Connect to MS Graph" button to authenticate. The button will display "Successfully Connected" when the connection is established.
- Install Modules: Click the "Install Modules" button to install the necessary PowerShell modules for the script to run. The button will display "Modules Installed" when the modules are successfully installed.
- Search: Enter the device name in the provided text box and click the "Search" button. The device details will be displayed in the text blocks below, and the availability status of the device in Intune, Autopilot, and AzureAD will also be shown.
- Offboard: Click the "Offboard" button to remove the device from Intune, AutoPilot, and Azure AD. A success message will be displayed after each successful removal.
- Ensure you have administrative permissions to install necessary modules.
- Ensure you have the necessary privileges in your Microsoft 365 subscription to offboard devices from Intune, AutoPilot, and Azure AD.
If you face any issues while running the script, please check the following:
You have a valid Microsoft 365 subscription.
You have installed the necessary modules.
You have administrative privileges.
The device name you're searching for exists in the respective services.
This tool is provided as-is, with no warranties. Always test scripts and tools in a safe and recoverable environment before deploying them in production. Please ensure you have proper backups before performing any offboarding. Contributions
Feel free to check the issues page.
This project is MIT licensed.