Get the App
SLTechnology News&Howtos  ›  Servers  › 

Combing the local account number of the computer through SCCM-- SQL sentence carding

Shulou Source: shulou.com Published: 2022-06-02 22:35:05 10月03日 Update

SQL statement query

Declare @ olddcm datetime

Declare @ oldhinv datetime

Set @ oldDCM=DATEADD (DAY,-3, getdate ())

Set @ oldHinv=DATEADD (DAY,-3, getdate ())

Select sys1.netbios_name0

, lgm.name0 [Name of the local Group]

, lgm.account0 as [Account Contained within the Group]

, lgm.category0 [Account Type]

, lgm.domain0 [Domain for Account]

, lgm.type0 [Type of Account]

, case when ws.lasthwscan < @ oldhinv then 'Last Hinv might be out of date'

When cs.lastcompliancemessagetime < @ olddcm then'CI evaluation might be out of date'

When ws.lasthwscan < cs.lastcompliancemessagetime then'CI evaluated since hinv, not necessarily unreliable'

Else 'Recent CI Eval, Hinv since CI Eval = Fairly Reliable'

End as [Reliability of Information], lgm.TimeStamp

From

V_gs_localgroupmembers0 lgm

Join v_gs_workstation_status ws on ws.resourceid=lgm.resourceid

Join v_r_system_valid sys1 on sys1.resourceid=lgm.resourceid

Left join v_CICurrentComplianceStatus cs on cs.resourceid=lgm.resourceid

Left join v_LocalizedCIProperties_SiteLoc loc on loc.ci_id=cs.ci_id

Where loc.displayname = 'local group members into WMI With logging' and Netbios_Name0 =' lw7cneczgwitzy1'

Order by sys1.netbios_name0, lgm.name0, lgm.account0

Tags: Statement query computer account Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn Shulou Tech Info Shulou Technology Apple