문제

I need to create a SCCM 2007 report to check the time zone over a specific collection. I found something to do this, but is not working when i insert it in the Report SQL Statement.

select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.NetbiosName, SMS_G_System_COMPUTER_SYSTEM.CurrentTimeZone from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.CurrentTimeZone != -360 order by name
도움이 되었습니까?

해결책

For a report you need to use the database views, see below for a quickly modified query which should do what you need:

select 
    v_R_System.Name0,   
    v_GS_COMPUTER_SYSTEM.CurrentTimeZone0 
from v_R_System 
inner join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System.ResourceId 
join v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
where 
    v_GS_COMPUTER_SYSTEM.CurrentTimeZone0 != -360 
    AND v_FullCollectionMembership.CollectionID = '<yourcollectionid>'
order by Name0

Just replace "<yourcollectionid>" with the id you want to query.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top