Unit functions
Unit functions let you create and delete units and retrieve or change information about specific units from a script, including their relations to groups, packages, printers, users, and management points.
Identify units in function calls
Section titled “Identify units in function calls”Most unit functions take a unit name and a unit type:
- Unit name: Most functions also accept the UUID of the unit instead of the name. The parameter description on each function page says whether the UUID is accepted. Unit names aren’t always unique, so use the UUID if several units can have the same name.
- Unit type: Use “Computer” or “User”. You can also use the numeric IDs 1 (Computer) and 2 (User).
- Management Point: When you look up a unit or a package by name, most functions work on the Management Point that you selected with Set instance management point. See Container functions for the typical start of an SDK script, and for how errors are reported.
In this section
Section titled “In this section”- Add printer to unit - Add printer to unit.
- Add unit to business unit - Add unit to business unit.
- Add unit to calendar group - Add unit to calendar group.
- Add unit to folder - Add unit to folder.
- Add unit to group - Adds unit to group.
- Add unit to group (BU) - Add unit to group (BU).
- Add unit to package - Adds unit to package.
- Add unit to reinstall - Adds unit to reinstall.
- Clear Primary User - Clear the primary user on a unit.
- Create unit - Create Unit.
- Delete unit - Delete Unit.
- Delete unit by UUID - Delete unit by UUID.
- Exist unit - Exist Unit.
- Exist unit location - Checks if a unit exists with the specified name and location.
- Exist Unit On Management Point - Checks whether a unit is linked to a specific management point.
- Exist uuid - Checks if a unit with the specified uuid exists.
- Get devices linked to vpp user - Get devices linked to vpp user.
- Get group Printers - Get printers linked to a group.
- Get group units - Gets units linked to a group.
- Get package units - Gets units linked to a package.
- Get reinstall status - Get reinstall status.
- Get unit description - Gets unit description.
- GetUnitFolder - Gets unit folder.
- Get unit groups - Get unit groups.
- Get unit last runtime - Get unit last agent run time.
- Get unit linked units - No longer supported. Use Get Unit Relations instead.
- Get unit linked user - No longer supported. Use Get Unit Relations instead.
- Get Unit Management Point - Get a unit’s Management Point.
- Get unit management server relation - Get a unit’s Management Server.
- Get unit packages - Get unit packages.
- Get unit package status - Get Unit package relation status.
- Get Unit Relations - Gets the users or computers related to a unit, such as the primary user.
- Get units - Get units.
- Get Units in Folder - Get units in a folder.
- Get units on business unit - Gets units on business unit.
- Get unit WSUS Group - Get unit WSUS Group.
- Get Users - Get Users.
- Get users linked to vpp user - Get users linked to vpp user.
- Get WSUS Group units - Get WSUS Group units.
- Move Device To Management Point - Move Device to Management Point.
- Remove unit from business unit - Remove unit from business unit.
- Remove unit from calendar group - Remove unit from calendar group.
- Remove unit from group - Remove unit from group.
- Remove unit from package - Remove unit from package.
- Remove unit from reinstall - Remove Unit from reinstall.
- Rename unit - Rename unit.
- Restart Agent using SDK - Restart Agent.
- Send Unit Command - Sends unit command.
- Set Primary User - Set primary user on unit.
- Set unit description - Set unit description.
- Set unit label - Sets the unit label.
- Set unit name - Sets unit name.
- Set unit package status - Set Unit Package Status.
- Set unit status - Set unit status.
- Set unit WSUS Group - Set unit WSUS group.
- Set Wake On LAN - Sets Wake On LAN.