Skip to main content

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

  1. Login to the SureMDM Web Console.

  2. Navigate to: Enrollment > Manual Enrollment > Windows > CLI Based Enrollment

Step 2: Configure Enrollment Settings

  1. Click Configure to customize enrollment settings.

  2. The Enrollment Configuration window appears.

  3. Enter the required configuration details:

Enrollment ConfigurationDescription
Enrollment Group PathSpecifies the group in the SureMDM console where the device will be enrolled.
Device Name TypeSelect 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:
  • Set Device Name Manually
  • Use Mac Address
  • System Generated BIOS Name
  • Use Device Host Name
  • Use Product Serial Number
SureMDM Agent URLSelect 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 URLEnter the complete URL where SureMDM Agent is hosted, This option appears when ‘Custom’ is selected as an option in ‘SureMDM Agent URL’ dropdown.
Download PathEnter the complete UNC path where the file will be downloaded. Ensure to include the full folder path, file name, and file extension.
note

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

  1. After entering the required details, click Apply.

  2. Once the configuration is applied, the CLI enrollment command will be generated and displayed in an encoded format.

  3. Click Copy Command to copy the generated command.

Step 4: Execute CLI Command on Windows Device

  1. Open Command Prompt or PowerShell on the target Windows device.

  2. Paste the copied enrollment command and press Enter to start the enrollment process.

The SureMDM Agent will be downloaded, installed, and configured automatically.

note

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

  1. 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.

note
  • 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.