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

# XtfRemoveCredential

> XtfRemoveCredential

# XtfRemoveCredential

Removes credentials from the given console. Use [XtfAddCredential](/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m) add credentials.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XtfRemoveCredential(
         LPCWSTR address,
         LPCWSTR serverName
)  
```

<a id="ID4EK" />

### Parameters

*address*<br />Type: LPCWSTR

\[in] Address of the console.

*serverName*<br />Type: LPCWSTR

\[in] Target server or share name.

<a id="ID4ER" />

### Return value

Type: HRESULT

A return value of **S\_OK** indicates the function succeeded. Any other value indicates an unexpected error occurred.

## Remarks

Use [XtfAddCredential](/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m) to add credentials. Use [XtfRemoveCredential](/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m) to remove credentials. Use [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfocount-xtfapi-xbox-windows-m), [XtfGetCredentialInfoCount](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfocount-xtfapi-xbox-windows-m), [XtfGetCredentialServerName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m), and [XtfGetCredentialUserName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m) to enumerate the current list of stored credentials. Use [XtfCloseCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m) to free the XtfNetworkCredentials returned by [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m).

See [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) for an example of how to use this API.

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

## See also

[Run from PC Deployment (NDA topic)](/home/setup-install/concepts/deployment)<br />[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)


## Related topics

- [XtfAddCredential](/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m.md)
- [XtfCloseCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialUserName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialServerName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialInfoCount](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfocount-xtfapi-xbox-windows-m.md)
