> ## 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.

# SetDefaultConsole

> IXtfConsoleManager::SetDefaultConsole Method

Sets the default development console for XBOX Tools Framework (XTF) tools and API.

## Syntax

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

### Parameters

*pszAlias*\
Type: LPCWSTR

A pointer to the name of the development console to set as the default development console.

### Return value

Type: HRESULT

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

## Remarks

This method sets the development console with the alias specified in `pszAlias` from the [IXtfConsoleManager](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md) instance as the default development console to use with XBOX Tools Framework (XTF) tools and API on this PC.

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

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

- [OnChangedDefaultConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onchangeddefaultconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox.md)
- [XtfGetDefaultAddress](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/methods/xtfgetdefaultaddress-xtfconsolemanager-xbox-windows-m.md)
- [IXtfConsoleManager Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t.md)
- [XtfGetSavedConsoleAddress](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetsavedconsoleaddress-xtfapi-xbox-windows-m.md)
- [AddConsole](https://docs.xbox.com/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/addconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
