How to Migrating from On-Premise Active Directory to Entra ID with Intune
Guide to Setting Up Autopilot and Migrating to Entra ID with Intune
1. Creating an Autopilot Profile
Windows Autopilot streamlines the setup of new devices, allowing users to get up and running with minimal IT intervention.
Step 1: Create a Dynamic Security Group
To automatically group Autopilot devices:
- Navigate to the Azure portal and select Azure Active Directory > Groups > New Group.
- Set the following:
- Group Type: Security
- Group Name:
SG_AutoPilotDevices
- Membership Type: Dynamic Device
Under Dynamic device members, enter the following rule:
1
(device.devicePhysicalIDs -any (_ -startsWith "[ZTDId]"))
This rule ensures all Autopilot devices are automatically added to the group.
Step 2: Create an Autopilot Deployment Profile
- In Intune, go to Devices > Windows > Windows enrollment > Deployment Profiles.
- Click + Create profile and select Windows PC.
- Configure the profile:
- Name:
Autopilot
- Convert all targeted devices to Autopilot: Yes
- Deployment mode: User-Driven
- Join to Azure AD as: Azure AD joined
- User account type: Standard
- Language (Region): Operating system default
- Automatically configure keyboard: No
- Name:
- Assign the profile to All Devices.
- Click Create.
Note: The device conversion process can take up to 48 hours. To expedite, you can manually register devices using the
Get-WindowsAutopilotInfo.ps1 -Online
script.
2. Migrating Group Policies to Entra ID
Migrating your Group Policy Objects (GPOs) to Intune allows for centralized management and supports devices that are not connected to the corporate network.
Step 1: Export Group Policy
- Open Group Policy Management Console on your domain controller.
- Right-click the desired GPO and select Save Report.
- Save the report as an XML file.
Step 2: Import into Intune
- In Intune, navigate to Devices > Group Policy analytics (preview).
- Click Import and select the XML file.
- Once analyzed, you’ll see a compatibility report.
- Select the policy and click Migrate to create an equivalent Intune policy.
Step 3: Assign the Policy
- Assign the new policy to the
SG_AutoPilotDevices
group. - Review and modify settings as necessary.
3. Configuring Applications in Intune
Deploy essential applications to devices to ensure users have the tools they need.
Deploying Company Portal
The Company Portal app allows users to install available applications and manage their devices.
- In Intune, go to Apps > Windows > + Add.
- Select Microsoft Store app (new).
- Search for Company Portal and select it.
- Configure the app information as needed.
- Under Assignments, set it as Required for the appropriate user or device groups.
- Click Next and then Create.
Deploying Other Applications
Repeat the steps above to deploy:
- Microsoft Office
- Microsoft Edge
For applications that users can choose to install:
- Set Assignment to Available for enrolled devices.
- Assign to the relevant user groups.
4. Migrating Users to Entra ID Devices
When moving users to new devices:
- Inventory Applications: Ensure all required applications are available in Intune.
- Backup Data: Use OneDrive to back up user data from Desktop, Documents, and Pictures.
- Browser Settings: Import bookmarks and settings to Microsoft Edge and enable synchronization.
- Assign User to Device: Use Autopilot to assign the user to the new device.
Device Setup Process
Before setting up the device, you’ll need to gather the necessary hardware information to register it in Intune. We’ll be using the Get-WindowsAutoPilotInfo PowerShell script for this process.
Here’s how to get the devices ready for Intune:
Step 1: Install the Windows AutoPilot Info Script
The Get-WindowsAutoPilotInfo script is available on the PowerShell Gallery. Follow these steps to install it:
- Open PowerShell as an administrator.
- Run the following command to install the script:
1
Install-Script -Name Get-WindowsAutoPilotInfo
- When prompted to trust the repository, type Y to confirm.
The script will now be installed in the default PowerShell scripts directory:
1
cd "C:\Program Files\WindowsPowerShell\Scripts"
Step 2: Use the Script to Gather Device Info
Once the script is installed, you can use it to gather the hardware hash and device information for Autopilot registration. You have two options:
Import a Single Device
For this demonstration, we’ll focus on gathering information for a single device and importing it directly into Intune.- Run the following command:
1
WindowsAutoPilotInfo.ps1 -Online
Note: If you encounter an error saying that scripts are not allowed to run, you can temporarily allow scripts by running the following command:
1
Set-ExecutionPolicy Unrestricted -Scope Process
- This command uploads the device’s hardware hash directly to Intune using your authenticated session.
- Run the following command:
Gather Information for Multiple Devices
If you need to gather hardware information for multiple devices over the network, you can use theGet-ADComputer
cmdlet to retrieve a list of devices and pipe that into the Get-WindowsAutoPilotInfo script.- Use the following command to gather information for multiple devices and export it to a CSV file:
1
Get-ADComputer -Filter * | .\GetWindowsAutoPilotInfo.ps1 -OutputFile .\MyComputers.csv
- To enable this method, you’ll need to ensure the appropriate firewall rules are activated on the target devices. Specifically, enable the following rules in the firewall settings:
- Windows Management Instrumentation (WMI-In)
- Windows Remote Management (HTTP-In)
Note: This method is ideal for bulk device setup but requires network configuration and elevated permissions.
- Use the following command to gather information for multiple devices and export it to a CSV file:
Step 3: Device Setup Process
Once the device has been registered in Intune, proceed with the following steps:
- Connect the Device to the Internet
- Use Ethernet or configure Wi-Fi during the initial setup process.
- Sign in with the User’s Work Account
- When prompted, the user signs in with their organizational account (e.g., their Microsoft 365 credentials).
- Configure Windows Hello
- The user sets up Windows Hello, which can include a PIN, fingerprint, or facial recognition, depending on the device’s capabilities.
- Automatic Policy and Application Deployment
- After signing in, the device setup will complete automatically.
- Company policies and applications are deployed to the device as configured in Intune.
Conclusion
Migrating from an on-premise Active Directory environment to Entra ID using Intune enhances flexibility, security, and user experience. With this setup, users can work remotely without relying on VPNs for policy updates or application installations.
For any questions or further assistance, feel free to leave a comment below. Don’t forget to subscribe for more guides on modernizing your IT infrastructure.