SMS SQL to show AD Sites for your Distribution Points
Shows you AD Sites for your Distribution Points.
----Begin SQL----
Select SiteCode 'SMS Site', name0 'Name', AD_Site_Name0 'Servers Physical AD Site', IP_Addresses0 'Servers IP' from dbo.v_R_Systemjoin v_SystemResourceListon name0 = servernameleft outer join dbo.v_RA_System_IPAddresseson v_R_System.resourceid=v_RA_System_IPAddresses.resourceidwhere RoleName = 'SMS Distribution Point'
order by SiteCode, name0 desc
----End SQL----
----Begin SQL----
Select SiteCode 'SMS Site', name0 'Name', AD_Site_Name0 'Servers Physical AD Site', IP_Addresses0 'Servers IP' from dbo.v_R_Systemjoin v_SystemResourceListon name0 = servernameleft outer join dbo.v_RA_System_IPAddresseson v_R_System.resourceid=v_RA_System_IPAddresses.resourceidwhere RoleName = 'SMS Distribution Point'
order by SiteCode, name0 desc
----End SQL----
About the Author
Emmanuel Tsouris is a Systems Management veteran and Developer Advocate specializing in PowerShell and Cloud Automation. He maintains DotVBS to preserve legacy knowledge for the "archaeologist admin."
Ready to move from VBScript to the Cloud? Check out his book, Pro PowerShell for Amazon Web Services.
Visit EmmanuelTsouris.com for his latest projects.
As an Amazon Associate, I earn from qualifying purchases at no cost to you.
Comments