Page tree
Skip to end of metadata
Go to start of metadata

Description

This function is used to create a unit command for a mobile device. Supported commands are: SWInventory, HWInventory, SecInventory, ManagedSoftwareInventory, RestartDevice, ShutdownDevice, Lock, PasswordReset, Wipe.

To create a Wipe command you will need Administrator rights for units in the security model.

Some commands require certain capabilities on the device, and they will be rejected if the device does not have those. The capabilities of a device, are displayed in the details tab of a selected device in the Console.

Syntax

Public Function SendUnitCommand(ByVal deviceUUID As String, command As String, ByVal changelogComment As String) As Boolean

Parameters

DeviceUUID (String)

The UUID of the device

Command (String)

The name of the command. Possible values are: SWInventory, HWInventory, SecInventory, ManagedSoftwareInventory, RestartDevice, ShutdownDevice, Lock, PasswordReset, Wipe

ChangelogComment (String)

A comment that will be added to the changelog entry on the proifile.



Return value

Returns a boolean value. True if succeeded, false if not.

Example

VBScript
Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False)
Wscript.echo oCMS.SetDefaultManagementPoint("2")
  
Wscript.echo oCMS.SendUnitCommand("CC5904AC-41B8-4D60-A925-D82EB157B594", "RestartDevice", "Cmd from the sdk")

Read more on unit commands here: Send Commands to device

  • No labels