Example usage for exit.
exit /b 0Exit the command interpreter or return from a batch script with an exit code.
exit [/b] [<exitcode>]The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.
Example usage for exit.
exit /b 0Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.
exit| Option / clause | Description |
|---|---|
/b | Exit the current batch script instead of the command interpreter. |
<exitCode> | Set the process or batch return code. |
/? | Display command help or the supported command-line usage. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.