# DeleteServer

## Description

When this method is called, Qlik Enterprise Manager will:

* Delete the specified server from Qlik Enterprise Manager
* Stop monitoring any tasks that were defined on the server
* Delete all messages related to the server from the Message Center
* Delete all user roles defined for the server, the server tasks, and the server endpoints

Information note

The above operations will be performed, regardless of whether the server is currently being monitored or in an error state.

Required User Role: See [Required Enterprise Manager permissions](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Syntax

`public void DeleteServer(` `string server` `);`

## Parameters

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| server | string | The name of the server to be deleted. |

## Return values

N/A

## Errors

All of the [general errors](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/CurlAPI/error_handling.htm) as well as the errors listed in the table below.

Error responses

| Error | Text | Description |
| --- | --- | --- |
| AEM\_SERVER\_NOT\_FOUND | Requested server "{server}" could not be found. | The server name is unknown to Qlik Enterprise Manager. |
| AEM\_DELETE\_SERVER\_INNER\_ERR | Failed to delete requested server "{server}". | Qlik Enterprise Manager encountered an error/exception when trying to delete the server. |