Delete a group of devices from the blacklist via script
search cancel

Delete a group of devices from the blacklist via script

book

Article ID: 402844

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We need to remove many devices that are blacklisted and would like to do it via script.

Environment

UIM 23.4+

Resolution

1. Run the following query to obtain the bl_id for the list of devices that need to be unblacklisted

select * from CM_BLACKLIST_COMPUTER_SYSTEM

2. Copy the bl_ids for devices to a text file and name it bl_ids.txt

3. Create the following batch file with the pu command and the discovery_server unblacklist_devices callback.

Note: Replace <password> with your UIM's administrator password

@ECHO OFF

SET PASSWORD=<password>

FOR /F "tokens=*" %%A in (bl_ids.txt) do (
pu.exe -u administrator -p %PASSWORD% discovery_server unblacklist_devices %%A
)

4. Open the command prompt with 'Run as administrator' and run the batch file with single bl_id in the bl_ids.txt file.

5. Confirm that device is removed from the cm_black_device table with query below

Example for a single bl_id
select * from CM_BLACKLIST_DEVICE where bl_id in (1755)

Example for a multiple bl_ids
select * from CM_BLACKLIST_DEVICE where bl_id in (1755,1367)

6. Run the batch with the full list and run above queries to confirm that devices are removed

Additional Information