Skip to content

Using SheetsMDM

jenjac edited this page Jan 5, 2019 · 4 revisions

The SheetsMDM Interface

When you authorized the script under your account, it created two sheets in your Google spreadsheet, "Devices and Settings", and "Device Responses".

The "Devices and Settings" sheet is populated with device data when a device is Enrolled, and when a device sends a "Status" response to your web app.

The "Device Responses" sheet is populated whenever a device sends an MDM response, such as during Enrollment, or in response to a command or status update.

To start getting data in your Google sheet, erase any enrolled devices and run through the activation and enrollment process again.

Once one or more devices have been populated into the spreadsheet, you can use the "SheetsMDM" menu along with the "Devices and Settings" sheet, to interact with your devices.

Interacting With Your Devices

The "SheetsMDM" menu in your spreadsheet as a "Sync" option that will query your server for updated DEP information for each device row.

It also has a "Run Command" menu that contains a pre-defined list of MDM commands that are set up for you.

To run a command on a device, follow these steps:

  1. Select a cell in a device row on the "Devices and Settings" sheet. (Such as the cell containing the Serial Number).
  2. Select "SheetsMDM", then "Run Command", and select a command such as "Restart Device".
  3. An alert popup will be presented with information about the selected device, so you can verify that the correct device has been selected. Select "OK" to send the command.

Try out the pre-defined commands. Each time a command is sent, you will be able to monitor the responses from the devices on the "Device Responses" sheet.

Automations using the SheetsMDM Web App

Right now, the web app is set to automatically send a DeviceInformation command to each device when it Enrolls, and it is set up to automatically assign a standard set of VPP apps to any device that enrolls and send an install command for all VPP apps assigned to a device.

The DeviceInformation response for each device can be viewed in the Device Responses tab, as well as the response from the InstallApplication commands issued for the VPP apps.

The web app is also set up to update the row for the device in the "Devices and Settings" sheet any time a device sends a "Status" response.

This app is meant to be an example of what you can do by making your own web app interface for MicroMDM.

If you want to set up your own automations, such as sending the DeviceInformation data on to your Inventory System, or sending an email to you whenever a device has almost reached its hard drive capacity, you can do that by editing the responses.gs file. The automation routines are done in the processAutoRun and the respondTo... functions. With a little Javascript, the possibilities are rather endless!

You will also want to check out the doPost and the doGet functions.

The doPost function handles all the device responses by parsing the xml plist that the device sends, and outputting the response, as well as passing the data to the processAutoRun function.

The doGet function handles special integrations, like the Munki integrations.

NOTE: Each time you make a change to your web app script, you will have to re-publish the script using a new version, in order for your web app to reflect the changes.


To learn more about the integrations that I have created, continue to the next section: Integrations


Clone this wiki locally