Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to delete IP from Discovery IP Ranges

Takumi_
Tera Contributor

Hi All.

I'm looking for delete IP address from Discovery IP Ranges.

 

I was trying to use GlideRecord. But It doesn't work.

Because It's complicated structure, or my fault.

 

Please share the script.

 

Regards.
Takumi H

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Takumi_ 

What is the type of IP range ?

AnveshKumarM_0-1701765532399.png

 

If it is IP Address List  you can query the discovery_range_item_ip table with query as item_parent=SYS_ID of IP Address range and find the IP and delete record.

 

If the IP Range is of other types, you can not delete a specific IP, but you can exclude it from the discovery.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

View solution in original post

2 REPLIES 2

AnveshKumar M
Tera Sage
Tera Sage

Hi @Takumi_ 

What is the type of IP range ?

AnveshKumarM_0-1701765532399.png

 

If it is IP Address List  you can query the discovery_range_item_ip table with query as item_parent=SYS_ID of IP Address range and find the IP and delete record.

 

If the IP Range is of other types, you can not delete a specific IP, but you can exclude it from the discovery.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

Takumi_
Tera Contributor

It's IP Address List.

I'll try it.

Thank you so much.