SQL Query for the ConfigMgr Database which provides a summary of servers built in the last 31 days.
SELECT Distinct | |
GSSYS.Domain0 as 'Domain Name', | |
SYS.Name0 as 'Machine Name', | |
OS.Caption0 as 'OS', | |
OS.Description0 as 'Description', | |
GSSYS.SystemRole0 as 'Role', | |
OS.InstallDate0 as 'OS Install Date', | |
OS.TotalVisibleMemorySize0 as 'Allocated Memory', | |
CS.NumberOfProcessors0 as 'Allocated CPU' | |
FROM | |
v_R_System as SYS inner join v_GS_COMPUTER_SYSTEM as CS on CS.ResourceID = SYS.ResourceID | |
inner join v_GS_OPERATING_SYSTEM as OS on OS.ResourceID = SYS.ResourceID | |
inner join v_GS_SYSTEM as GSSYS on GSSYS.ResourceID = SYS.ResourceID | |
WHERE | |
DATEDIFF(day,OS.InstallDate0,getdate()) < 31 | |
and | |
GSSYS.SystemRole0 = 'Server' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment