Description
This function is used to link unlink a profile to a devicefrom a device. This will NOT remove the profile from the physical device. For that functionality, look at Remove profile from device, which will do both.
Syntax
Code Block | ||
---|---|---|
| ||
Public Function AddUnitToProfileUnlinkUnitFromProfile(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
Code Block | ||
---|---|---|
| ||
Set oCMS = CreateObject("CapaInstaller.SDK") Wscript.echo oCMS.SetDatabaseSettings("ServerName", "CapaInstaller", False) Wscript.echo oCMS.SetDefaultManagementPoint("2") Wscript.echo oCMS.AddUnitToProfileUnlinkUnitFromProfile("Testdev01", "Wi-Fi settings", "AddedUnlinked profile tofrom device from SDK") Wscript.echo oCMS.AddUnitToProfileUnlinkUnitFromProfile("4eea2959-fb4c-4afe-b61f-810cb3019cd6", "Wi-Fi settings", "AddedUnlinked profile tofrom device from SDK") |