SCCM 2007报告检查服务器时区

时间:2013-10-21 22:10:00

标签: timezone report sccm

我需要创建一个SCCM 2007报告来检查特定集合的时区。我发现了一些事情要做,但是当我将它插入报告SQL语句时,它无法正常工作。

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

1 个答案:

答案 0 :(得分:1)

对于您需要使用数据库视图的报告,请参阅下面的快速修改查询,该查询应该满足您的需求:

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

只需替换“&lt; yourcollectionid&gt;”使用您要查询的ID。