Remove profile from device

 

Description

This function will remove a profile from a device by setting the relation status to ‘RemoveProfile’ (in the UnitMDMProfile table). Subsequently, when the device reports successful removal of the profile, the relation is then removed from the database. If you do not want to remove the profile from the physical device but only unlink the profile from the device, look at https://capasystems.atlassian.net/wiki/spaces/CI62DOC/pages/8018730262

Syntax

Public Function RemoveUnitFromProfile(unitName As String, profileName As String, changelogComment As String) As Boolean

Parameters

UnitName(String)

The UnitName or UUID of the unit.

ProfileName(String)

The name of the MDM Profile

ChangelogComment (String)

A comment that will be added to the changelog entry on the profile and the device

Return value

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

Example

VBScript
Set oCMS = CreateObject("CapaInstaller.SDK") Wscript.echo oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False) Wscript.echo oCMS.SetDefaultManagementPoint("2") Wscript.echo oCMS.RemoveUnitFromProfile("Testdev01", "Wi-Fi settings", "Removed profile from device from SDK") Wscript.echo oCMS.RemoveUnitFromProfile("4eea2959-fb4c-4afe-b61f-810h31139cd6", "Wi-Fi settings", "Removed profile from device from SDK")