Using dzleave

To leave a zone, use the dzleave command. The syntax for the dzleave command is:

dzleave [/c <domain controller>] [/u <username>] [/a|/f] [/r [y|n|yes|no]] [/v] [/h]
Use this option To do this

/a

Remove the role assignment from the computer zone.

/c

Specify a domain controller to connect to.

/u

Specify the user name to leave zone using custom credentials. The user name must be in the format: USER@DOMAIN or DOMAIN\USER. The credentials are for remote access only. For the password, you can specify by redirected input. Otherwise, this tool will prompt user for password.

/f

Suppress any warning and/or question(s). In case the domain cannot be contacted, this tool will perform a local zone leave automatically.

/h

Displays the command help.

/r

Specify whether to restart machine, if required, after leaving zone without prompt. If no restart is needed, this option is ignored. If no argument is provided, example: '/r', the default is to restart ('/r yes').

/v

Show the agent version.

Note:   You can also use the PowerShell command Exit-CdmZone to leave a zone.