Skip to content

Link profile to device

This function is used to link a profile to a device

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

The UnitName or UUID of the unit.

The name of the MDM Profile

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

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

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