Adding Display name to “All Systems” query

select
    r.Name,
    r.SMSAssignedSites,
    r.IPAddresses,
    r.IPSubnets,
    r.OperatingSystemNameandVersion,
    r.ResourceDomainORWorkgroup,
    ru.name,
    r.LastLogonUserDomain,
    r.LastLogonUserName,
    r.SMSUniqueIdentifier,
    r.ResourceId,
    r.ResourceType,
    r.NetbiosName
from
    sms_r_system r,
    sms_r_user ru
Where
    r.LastLogonUserDomain = ru.WindowsNTDomain
    and r.LastLogonUserName = ru.UserName

Leave a Reply

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