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

# IXtfConsoleManager::RemoveConsole Method

> IXtfConsoleManager::RemoveConsole Method

# IXtfConsoleManager::RemoveConsole Method

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

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*pszAlias*\
Type: LPCWSTR

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

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## Remarks

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

After this method is successfully called, the `IXtfConsoleManager` instance invokes the [OnRemoveConsole](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onremoveconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microso) callback method from the associated [IXtfConsoleManagerCallback](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/ixtfconsolemanagercallback-xtfconsolemanager-xbox-microsoft-t) instance. If the default development console is removed, the [OnChangedDefaultConsole](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onchangeddefaultconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox) 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)](/tools/tools-console/commandlinetools/xbconnect).

<a id="requirementsSection" />

## Requirements

**Header:** xtfconsolemanager.h

**Library:** xtfconsolemanager.lib

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

<a id="seealsoSection" />

## See also

[IXtfConsoleManager Interface](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t)\
[XtfConsoleManager](/reference/tools/xtf/xtfconsolemanager/xtfconsolemanager-xbox-microsoft-n)


## Related topics

- [IXtfConsoleManager::AddConsole method](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/addconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
- [IXtfConsoleManagerCallback::OnRemoveConsole Method](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onremoveconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microso.md)
- [IXtfConsoleManager::EnumerateConsoles method](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/enumerateconsoles-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
- [IXtfConsoleManager::GetConsole Method](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/getconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
- [IXtfConsoleManager::GetDefaultConsole Method](/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/getdefaultconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
