Add/edit Enforce Passcode (Android)
Description
Section titled “Description”This function is used to add a new Enforce Passcode payload or edit an existing payload in the specified profile. The Enforce Passcode payload sets a passcode that the CapaInstaller Android agent must enforce. If the profile already has an Enforce Passcode payload for Android, its passcode is replaced. Otherwise a new payload is added.
Syntax
Section titled “Syntax”Public Function AddEditEnforcePasscodeAndroid(ProfileId As Integer, Passcode As String, ChangelogComment As String) As BooleanParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| ProfileId | Integer | The Id of the profile. Get it with Get Profiles. |
| Passcode | String | The passcode that the agent must enforce. The passcode is case-sensitive. |
| ChangelogComment | String | A comment that is added to the changelog entry of the profile. |
Return value
Section titled “Return value”Returns a boolean value. True if succeeded, false if not. The function returns false if no profile with the specified Id is found, for example if it’s the Id of a Device Application.
Example
Section titled “Example”Set oCMS = CreateObject("CapaInstaller.SDK")Wscript.echo oCMS.SetInstanceManagementPoint("2")
Dim iProfileId : iProfileId = 184Dim sPasscode : sPasscode = "918273"Dim sChangelogComment : sChangelogComment = "Changed passcode on profile with sdk"Wscript.echo "Changed passcode: " & oCMS.AddEditEnforcePasscodeAndroid(iProfileId, sPasscode, sChangelogComment)