How to find all the workstations within a two or more IP ranges.

SELECT DISTINCT

                v_GS_COMPUTER_SYSTEM.Name0 AS ‘PC Name’,

                v_GS_COMPUTER_SYSTEM.UserName0 AS ‘User Name’,

                v_GS_NETWORK_ADAPTER_CONFIGUR.DefaultIPGateway0 as ‘Gateway’

FROM

                v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM,

                v_GS_NETWORK_ADAPTER_CONFIGUR v_GS_NETWORK_ADAPTER_CONFIGUR

WHERE

                v_GS_NETWORK_ADAPTER_CONFIGUR.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID

                AND ((v_GS_NETWORK_ADAPTER_CONFIGUR.DefaultIPGateway0 Is Not Null))

                AND (v_GS_NETWORK_ADAPTER_CONFIGUR.DefaultIPGateway0 = ‘10.1.110.1’

                OR v_GS_NETWORK_ADAPTER_CONFIGUR.DefaultIPGateway0 = ‘10.13.88.254’)

Leave a Reply

Your email address will not be published. Required fields are marked *