> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RemoveConsole

> IXtfConsoleManager::RemoveConsole Method

Removes the development console with the specified name from the [IXtfConsoleManager](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md) instance.

## Syntax

```cpp theme={null}
public:
HRESULT RemoveConsole(
         LPCWSTR pszAlias
)  
```

### Parameters

*pszAlias*\
Type: LPCWSTR

A pointer to the name of the development console to remove.

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

## Remarks

This method removes the development console with the name specified in `pszAlias` from the [IXtfConsoleManager](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md) instance.

After this method is successfully called, the `IXtfConsoleManager` instance invokes the [OnRemoveConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onremoveconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microso.md) callback method from the associated [IXtfConsoleManagerCallback](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/ixtfconsolemanagercallback-xtfconsolemanager-xbox-microsoft-t.md) instance. If the default development console is removed, the [OnChangedDefaultConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onchangeddefaultconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox.md) callback method from the associated `IXtfConsoleManagerCallback` instance is also invoked.

For more information about connecting and querying development consoles, see [Connect (xbconnect.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbconnect.md).

## Requirements

**Header:** xtfconsolemanager.h

**Library:** xtfconsolemanager.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[IXtfConsoleManager Interface](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md)\
[XtfConsoleManager](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/xtfconsolemanager-xbox-microsoft-n.md)


## Related topics

- [OnRemoveConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onremoveconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microso.md)
- [AddConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/addconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
- [IXtfConsoleManager Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md)
- [RemoveDevice (XBOX Series consoles)](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_removedevice_public.md)
- [XBOX Manager: managing consoles and groups](https://docs.xbox.com/tools/tools-console/xbom/manager-tool-groups.md)
