SCCM Query for collecting IP adress and DNS information.

Nazeeruddin Mohammed 0 Reputation points
2023-06-11T08:38:26.9366667+00:00

In SCCM, I need either WQL (or) SQL query to know the IP address, IP subnet and DNS information of all my devices.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Muhammad Ahsan Khan 250 Reputation points
    2023-06-11T08:45:06.33+00:00

    Greetings,

    To collect IP address, IP subnet, and DNS information of all devices in SCCM, you can use a combination of WQL and SQL queries.

    SELECT
    	SMS_R_System.Name AS 'Device Name',
    	SMS_R_System.IPAddresses AS 'IP Addresses',
    	SMS_R_System.IPSubnets AS 'IP Subnets',
    	SMS_R_System.DNSServerSearchOrder AS 'DNS Servers'
    FROM
    	SMS_R_System
    

    Note that the data returned by this query may vary depending on the information available in the SCCM database and the discovery methods configured in your environment.

    Hope it helps!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.