Windows CLI Based Enrollment
Windows CLI (Command Line Interface)–based enrollment enables administrators to onboard Windows devices into SureMDM using command-line instructions. This method supports automated and standardized enrollment by allowing administrators to deploy enrollment commands through scripts or enterprise deployment mechanisms such as Group Policy Objects (GPO), device management tools, or other MDM solutions.
CLI-based enrollment supports bulk device onboarding and migration scenarios while enabling a zero-touch setup experience. This ensures consistent device configuration and reduces manual intervention during the enrollment process.
Supported Versions
- Windows 10
- Windows 11
Prerequisites
‘CLI Based Enrollment’ is supported on Windows devices with SureMDM Agent Version 6.22.0 and later.
To enroll Windows devices using CLI, follow the steps below:
Step 1: Navigate to Windows Enrollment
Login to the SureMDM Web Console.
Navigate to: Enrollment > Manual Enrollment > Windows > CLI Based Enrollment
Step 2: Configure Enrollment Settings
Click Configure to customize enrollment settings.
The Enrollment Configuration window appears.
Enter the required configuration details:
| Enrollment Configuration | Description |
|---|---|
| Enrollment Group Path | Specifies the group in the SureMDM console where the device will be enrolled. |
| Device Name Type | Select the naming method for Windows devices. The selected option will be used as the device's assigned name. Select from one of the following options:
|
| SureMDM Agent URL | Select the source for the SureMDM Agent. Choose ‘Latest SureMDM Agent’ to use the most recent version, or ‘Custom’ to specify your own agent URL. |
| Custom SureMDM Agent URL | Enter the complete URL where SureMDM Agent is hosted, This option appears when ‘Custom’ is selected as an option in ‘SureMDM Agent URL’ dropdown. |
| Download Path | Enter the complete UNC path where the file will be downloaded. Ensure to include the full folder path, file name, and file extension. |
If Set Device Name Manually is selected, the enrollment process prompts the user to enter the device name during enrollment. Enrollment completes only after the device name is provided.
Step 3: Apply Configuration
After entering the required details, click Apply.
Once the configuration is applied, the CLI enrollment command will be generated and displayed in an encoded format.
Click Copy Command to copy the generated command.
Step 4: Execute CLI Command on Windows Device
Open Command Prompt or PowerShell on the target Windows device.
Paste the copied enrollment command and press Enter to start the enrollment process.
The SureMDM Agent will be downloaded, installed, and configured automatically.
Upon running above CLI command, the enrollment process will be zero-touch for Users with Admin privileges, while Standard users will be prompted to enter admin credentials to install the SureMDM agent.
Step 5: Verify Enrollment Status
- Once the command execution completes:
The device will appear in the Device Grid in the SureMDM Web Console.
The device status will change to Online once the SureMDM Agent establishes communication with the server.
- Network restrictions or proxy configurations may impact agent download and installation.
- If using automation tools or scripts, verify that the command is executed in a silent or unattended mode as required.