Use the get_zone_users command to check Active Directory and return a Tcl list of zone users defined within the currently selected zone. If executed in a script, this command does not output its list to stdout, and no output appears in the shell where the script is executed. Use list_zone_users to output the list to stdout.

Zone type

Classic and hierarchical


get_zone_users [-upn]




This command takes the following option:

Option Description


Optional. Returns user names in user principal name (UPN) format rather than the default sAMAccount@domain format.


This command takes no arguments.

Return value

This command returns a Tcl list of zone users defined in the currently selected zone. By default, users are listed by sAMAccountName@domain. You can use the -upn option to return users listed by user principal name (UPN). If a zone user is an orphan user—that is, its corresponding Active Directory user no longer exists—the user is listed by its security identifier (SID) instead of the sAMAccountName or user principal name.



This example returns the list of users: adam.avery brenda.butler chris.carter

Related commands

Before you use this command, you must have a currently selected zone stored in memory. The following commands enable you to view and select a zone user:

  • list_zone_users lists to stdout the zone users and their NSS data in the current zone.
  • new_zone_user creates a new zone user and stores it in memory.
  • select_zone_user retrieves a zone user from Active Directory and stores it in memory.

After you have a zone user stored in memory, you can use the following commands to work with that zone user: