← Back to articles Intune

Automate Apple TV Enrollment with ADE in Intune

Automate Apple TV Enrollment with ADE in Intune

What This Script Does

This PowerShell script automates the enrollment of corporate-owned Apple TV devices into Microsoft Intune using Apple's Automated Device Enrollment (ADE). It simplifies the management of Apple TV devices by ensuring they are automatically registered and configured within Intune. Use this script when you need to bulk enroll multiple Apple TV devices efficiently.

Prerequisites:

  • Microsoft.Graph.Intune module
  • Access to Apple Business Manager
  • Permissions for DeviceManagementManagedDevices.ReadWrite.All Graph API
  • PowerShell 7.0 or above

The Complete Script

<# .SYNOPSIS Automates Apple TV enrollment into Intune using ADE. .NOTES Author: Souhaiel MORHAG | msendpoint.com | GitHub: https://github.com/Msendpoint License: MIT Version: 1.0 #>[CmdletBinding()]Param( [Parameter(Mandatory=$true, Position=0)] [string]$AppleTeamID = "YOUR_VALUE", [Parameter(Mandatory=$true, Position=1)] [string]$IntuneProfileID = "YOUR_VALUE" )try { Connect-MgGraph -Scopes "DeviceManagementManagedDevices.ReadWrite.All" $result = Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/deviceManagement/appleEnrollmentProfiles/$IntuneProfileID/devices/$AppleTeamID/enroll" -Method Post} catch {Write-Error "Failed to enroll devices: $_"} finally {Write-Output $result}

How It Works

The script utilizes Microsoft Graph API and the Apple Business Manager to automate the enrollment of Apple TV devices. After authenticating with Microsoft Graph using interactive login, it sends a POST request to the Intune API endpoint, enrolling devices associated with the specified Apple Team and Intune Profile IDs. Error handling ensures that any issues during the process are logged.

Usage & Parameters

Example usage of this script includes: ./EnrollAppleTVDevices.ps1 -AppleTeamID "12345678" -IntuneProfileID "abc-123" Sample output:Successfully enrolled devices under Apple Team ID: 12345678

Customization Ideas

  • To include additional device attributes, modify the JSON request payload.
  • For scheduled runs, set up a task in Windows Task Scheduler using this PowerShell script.
  • Include logging functionality to a central file for audit purposes.
  • Integrate email notifications for successful enrollments.
  • Use Azure Automation for serverless execution without a dedicated machine.
🎁 Free Community Assets

Functional Resources

Jump-start your automation with these production-ready assets associated with this guide.

PowerShell Script

Automate Enrollment of Apple TV Devices

Automate the enrollment of corporate-owned Apple TV devices into Microsoft Intune using Apple's ADE.

🎓 Ready to go deeper?

Practice real MD-102 exam questions, get AI feedback on your weak areas, and fast-track your Intune certification.

Start Free Practice → Book a Session
Souhaiel Morhag
Souhaiel Morhag
Microsoft Endpoint & Modern Workplace Engineer

Souhaiel Morhag is a Microsoft Intune and endpoint management specialist with hands-on experience deploying and securing enterprise environments across Microsoft 365. He founded MSEndpoint.com to share practical, real-world guides for IT admins navigating Microsoft technologies — and built the MSEndpoint Academy at app.msendpoint.com/academy, a dedicated learning platform for professionals preparing for the MD-102 (Microsoft 365 Endpoint Administrator) certification. Through in-depth articles and AI-powered practice exams, Souhaiel helps IT teams move faster and certify with confidence.

Related Articles

Popular on MSEndpoint