Use this method to mass deploy the license key to managed cloud devices. Before you begin, please ensure that you are logged in to your Microsoft 365 portal account.
Select Admin from the App launcher to open the Microsoft 365 admin center.
Select Show all on the Navigation menu.
Select Endpoint Manager to open the Microsoft Endpoint Manager admin center.
Select Devices from the Navigation menu and then Scripts on the Devices | Overview page.
Click Add > Windows 10 and later on the Devices | Scripts page. The Add PowerShell script page appears.
In the Basics section, type the name of the PowerShell script in the Name box then click Next.
In the Script settings section, click Select a file to select the PowerShell script file.
Note:The PowerShell script will add the license key in the Registry. You can download a template for this script file from here.
Select Yes to run the PowerShell script using the logged on credentials.
Leave all other settings as default and click Next.
In the Assignments section, click Add groups (under Included groups) to display the Select groups to include blade.
Select the desired Azure AD groups that you want to deploy the license key for from the Select groups to include blade and then click Select.
Leave all other settings as default and click Next.
In the Review + add section, review the summary of the settings and then click Add to complete the process of deploying the license key via Microsoft Intune.
Note: When you deploy the license key via Microsoft Intune, your changes will not take effect immediately. Devices in the selected Azure AD groups will either sync automatically over a period (generally 30 minutes), you can also sync all the devices in the selected groups manually via bulk devices actions or restart your computer to implement your changes immediately.