delete_zone

Use the delete_zone command to delete the currently selected zone from Active Directory and from memory. After you run this command, you cannot run subsequent ADEdit commands for zones because there will be no currently selected zone available in memory.

This command performs an LDAP sub-tree deletion operation. Only child zones that are in the same container as the specified parent zone are deleted. Child zones that are located in other containers are not deleted. Child zones that are based on pointers defined in the child zone are not deleted. For more information about deleting sub-tree objects, see delete_sub_tree.

In interactive mode, ADEdit prompts you for confirmation before executing this command. If you use this command in a script, ADEdit does not prompt for confirmation. You should use caution before using this command in a script.

Zone type

Classic and hierarchical

Syntax

delete_zone

Abbreviation

dlz

Options

This command takes no options.

Arguments

This command takes no arguments.

Return value

This command returns nothing if it runs successfully.

Examples

delete_zone

This example deletes the currently selected zone or computer role from Active Directory and from memory.

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 the zone to work with:

  • create_zone creates a new zone in Active Directory.
  • get_zones returns a Tcl list of all zones within a specified domain.
  • select_zone retrieves a zone from Active Directory and stores it in memory as the currently selected zone.

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

  • delegate_zone_right delegates an administrative right to a specified user or group.
  • get_child_zones returns a Tcl list of child zones, computer roles, or computer zones for the current zone.
  • get_zone_field reads a field value from the currently selected zone.
  • set_zone_field sets a field value in the currently selected zone.
  • get_zone_nss_vars returns the NSS substitution variable for the selected zone.
  • save_zone saves the selected zone with its current settings to Active Directory.