Set Primary User
Description
Section titled “Description”Sets the primary user on a unit.
Syntax
Section titled “Syntax”SetPrimaryUser(ByVal uuid As String, ByVal userIdentifier As String) As Boolean
Parameters
Section titled “Parameters”uuid(String)
The UUID of the unit (or device). Curly brackets around the UUID are allowed.
userIdentifier (String)
The user that you want to set as primary user on the unit. The user must exist as a unit in CapaInstaller.
Formats accepted as identifier:
| Format | Example |
|---|---|
| SID | S-1-5-21-2955346805-1668228357-4012311724-500 |
| UPN | user@example.com |
| Name | TestUser |
The Name format only finds users that don’t have a location, such as a domain. For domain users, use the SID or the UPN.
Return value
Section titled “Return value”Boolean. The function returns True if successful. If the unit or the user isn’t found, the function fails.
Example
Section titled “Example”Set oCMS = CreateObject("CapaInstaller.SDK")wscript.echo oCMS.SetPrimaryUser("B16BAC7B-2975-431C-A380-B702B1A83AF4", "user@example.com")