SQL query for SCCM to pull out Hostname, Ip Address , OU location and Operating system

Hi everyone ,

A simple sql query that will get you the hostname , IP address , OU location and operating system details from your SCCM database .

Select s.Netbios_Name0,ip.IP_Addresses0,
s.Distinguished_Name0,s.operatingSystem0,
s.Operating_System_Name_and0
from v_RA_System_IPAddresses AS IP
inner join v_R_System AS S
on ip.ResourceID=s.ResourceID
where operatingSystem0 like ‘%Server%’;

My requirement was for servers , but if you want desktops and servers both you can modify the query accordingly .

 

Advertisement

2 thoughts on “SQL query for SCCM to pull out Hostname, Ip Address , OU location and Operating system

Add yours

  1. Good blog! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a great day!

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: