Deletes one1 or more devices from the Ivanti EPM database without impacting core server stability. Device deletions are processed through a queue, with only a limited number of jobs executed simultaneously to prevent excessive server load.
| Included since version: | 4.5.31 |
| API Endpoint: | http://coreservername/five9sWS/five9sWS.asmx |
| Parameter: | JSON-Structure |
Usage
:
| Body data: | Description: |
| uri |
string, optional the address for the web service to be called e.g.: http://coreservername/five9sWS/five9sWS.asmx |
|
pat
|
string, mandatory the Personal Access Token is a credential used to authenticate with our service |
|
computerIdn
|
integer, mandatory The ID of the current computer to exclude from the search. Pass a negative value to exclude a non-existent computer. |
|
substringToSearch
|
string, mandatory The substring to search for at the beginning of the DisplayName (e.g., "PC" will match "PC-001", "PC-LAB", etc.) |
The function is build in a JSON structure and uses the following (required) parameters:
1)
Personal Access Token
(PAT) which can be configured in the Admin section of the five(9)s Console under Role Based Administration
2)
Array of computers
to delete
Info
:
The computer(s) to delete can be addressed by
- ComputerIdn
or
- Hostname or
- Serialnumber or
- MAC Address
If you use a combination of these additional attributes, only devices that exactly match will be deleted.
Please ensure to deliver all required parameters and leave additional computer attributes empty if you do not need them.
For
ComputerIdn
use 0 if you do not want to use this property.
{ "PAT": "D6R78199296C0DFDE2C014SD921FB20BD0AC798109C897A1261", "ComputerDataToDelete": [ { "Hostname": "HostSNA090", "SerialNumber": "", "MAC": "", "ComputerIdn": 0 } ] }
It can take up to 90 seconds for the background service to start working on the device deletion queue.
In case of an error, defined administrators receive an email.
You can configure the API email notification list by editing the settings.config or settings.yaml file. Simply add email addresses to the
CreateUpdateDevicesEmailRecipientsproperty. Multiple email addresses must be separated with a semicolon.
Get started with the following PowerShell:
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Content-Type", "text/xml") $headers.Add("Cookie", "ASP.NET_SessionId=dmky2w2t5al4q54rxz4u2dvh") $body = "<?xml version=`"1.0`" encoding=`"utf-8`"?> `n<soap:Envelope xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`" xmlns:xsd=`"http://www.w3.org/2001/XMLSchema`" xmlns:soap=`"http://schemas.xmlsoap.org/soap/envelope/`"> `n <soap:Body> `n <DeleteDevices xmlns=`"http://www.five9s.de/`"> `n <deleteDeviceDataAsJson>{ `n `"PAT`": `"D678B99096EnterYourPatHere0201420BD0AC`", `n `"ComputerDataToDelete`": [ `n { `n `"Hostname`": `"HostSNA090`", `n `"SerialNumber`": `"`", `n `"MAC`": `"`", `n `"ComputerIdn`": 0 `n } `n ] `n}</deleteDeviceDataAsJson> `n </DeleteDevices> `n </soap:Body> `n</soap:Envelope>" $response = Invoke-RestMethod 'http://coreserver/five9sWS/five9sWS.asmx?wsdl' -Method 'POST' -Headers $headers -Body $body $response | ConvertTo-Json
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article