---
title: Commands and queries
framework: Device Management
role: collectionGroup
role_heading: API Collection
path: devicemanagement/commands-and-queries
---

# Commands and queries

Remotely execute management commands and queries on managed devices.

## Overview

Overview The Mobile Device Management (MDM) protocol provides a way to tell a device to remotely execute certain management commands or queries. When a device registers with the device management service, the service sends push notifications to the device when there are commands to process on the device. When the device receives the notification, it polls the device management service for the command, processes the command, and reports the command results to the service. The device then checks for other commands to process. important: Device management is for enterprise use only. To use it in your app, the Account Holder of your app’s development team must request the Mobile Device Management capability. For more information, see Request a Mobile Device Management Capability.

## Topics

### Declarative management

- [Declarative Management](devicemanagement/declarative-management-command.md)

### Profile management

- [Install Profile](devicemanagement/install-profile-command.md)
- [Profile List](devicemanagement/profile-list-command.md)
- [Remove Profile](devicemanagement/remove-profile-command.md)
- [Install Provisioning Profile](devicemanagement/install-provisioning-profile-command.md)
- [Provisioning Profile List](devicemanagement/provisioning-profile-list-command.md)
- [Remove Provisioning Profile](devicemanagement/remove-provisioning-profile-command.md)

### Device details

- [Device Information](devicemanagement/device-information-command.md)
- [Device Configured](devicemanagement/device-configured-command.md)
- [User Configured](devicemanagement/user-configured-command.md)
- [Restrictions](devicemanagement/restrictions-command.md)

### Device state

- [Erase Device](devicemanagement/erase-device-command.md)
- [Device Lock](devicemanagement/device-lock-command.md)
- [Restart Device](devicemanagement/restart-device-command.md)
- [Shut Down Device](devicemanagement/shut-down-device-command.md)

### Managed apps

- [Install Application](devicemanagement/install-application-command.md)
- [Install Enterprise Application](devicemanagement/install-enterprise-application-command.md)
- [Installed Application List](devicemanagement/installed-application-list-command.md)
- [Managed Application List](devicemanagement/managed-application-list-command.md)
- [Remove Application](devicemanagement/remove-application-command.md)
- [Apply Redemption Code](devicemanagement/apply-redemption-code-command.md)
- [Validate Applications](devicemanagement/validate-applications-command.md)
- [Managed Application Attributes](devicemanagement/managed-application-attributes-command.md)
- [Managed Application Configuration](devicemanagement/managed-application-configuration-command.md)
- [Managed Application Feedback](devicemanagement/managed-application-feedback-command.md)

### Managed media

- [Install Media](devicemanagement/install-media-command.md)
- [Managed Media List](devicemanagement/managed-media-list-command.md)
- [Remove Media](devicemanagement/remove-media-command.md)

### Accounts

- [Account Configuration](devicemanagement/account-configuration-command.md)
- [Invite To Program](devicemanagement/invite-to-program-command.md)

### Passwords

- [Clear Passcode](devicemanagement/clear-passcode-command.md)
- [Clear Restrictions Password](devicemanagement/clear-restrictions-password-command.md)
- [Unlock User Account](devicemanagement/unlock-user-account-command.md)
- [Set Auto Admin Password](devicemanagement/set-auto-admin-password-command.md)
- [Set Firmware Password](devicemanagement/set-firmware-password-command.md)
- [Verify Firmware Password](devicemanagement/verify-firmware-password-command.md)

### Lost device

- [Enable Lost Mode](devicemanagement/enable-lost-mode-command.md)
- [Device Location](devicemanagement/device-location-command.md)
- [Play Lost Mode Sound](devicemanagement/play-lost-mode-sound-command.md)
- [Disable Lost Mode](devicemanagement/disable-lost-mode-command.md)

### Recovery Lock

- [Set Recovery Lock](devicemanagement/set-recovery-lock-command.md)
- [Verify Recovery Lock](devicemanagement/verify-recovery-lock-command.md)

### Content caching

- [Content Caching Information](devicemanagement/content-caching-information-command.md)

### AirPlay mirroring

- [Request Mirroring](devicemanagement/request-mirroring-command.md)
- [Stop Mirroring](devicemanagement/stop-mirroring-command.md)

### eSIM management

- [Refresh Cellular Plans](devicemanagement/refresh-cellular-plans-command.md)

### Managed settings

- [Disable Remote Desktop](devicemanagement/disable-remote-desktop-command.md)
- [Enable Remote Desktop](devicemanagement/enable-remote-desktop-command.md)
- [Settings](devicemanagement/settings-command.md)

### Lights-out management

- [LOM Device Request](devicemanagement/lom-device-request-command.md)
- [LOM Setup Request](devicemanagement/lom-setup-request-command.md)

### Security

- [Security Info](devicemanagement/security-info-command.md)
- [Certificate List](devicemanagement/certificate-list-command.md)
- [Activation Lock Bypass Code](devicemanagement/activation-lock-bypass-code-command.md)
- [Clear Activation Lock Bypass Code](devicemanagement/clear-activation-lock-bypass-code-command.md)
- [Rotate FileVault Key](devicemanagement/rotate-filevault-key-command.md)

### Extensions

- [Active NSExtensions](devicemanagement/active-nsextensions-command.md)
- [NSExtension Mappings](devicemanagement/nsextension-mappings-command.md)

### Enhanced logging

- [Trigger Enhanced Log Collection](devicemanagement/trigger-enhanced-log-collection-command.md)
- [Cancel Enhanced Log Collection](devicemanagement/cancel-enhanced-log-collection-command.md)

### User management

- [User List](devicemanagement/user-list-command.md)
- [Log Out User](devicemanagement/log-out-user-command.md)
- [Delete User](devicemanagement/delete-user-command.md)

## See Also

### MDM protocol

- [Check-in](devicemanagement/check-in.md)
