Lista de colecție de interogări Manager de configurare. All queries were tested.
Configuration Manager Clients Collections
Clienți neaprobați
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
inner join SMS_CM_RES_COLL_SMS00001 on SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId
where SMS_CM_RES_COLL_SMS00001.IsApproved= "0"
Clienți care necesită o repornire
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System join sms_combineddeviceresources on
sms_combineddeviceresources.resourceid = sms_r_system.resourceid
where sms_combineddeviceresources.clientstate != 0
Toate computerele client SCCM cu mai puțin de 5 GB spațiu liber pe disc pe C:
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace <= 5000
Toate obiectele computerului cu clientul instalat pe site-ul specific „21”
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.ADSiteName = "21" and SMS_R_System.Client = 1
Toate computerele fără client SCCM
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.Client = "0"
Colecții Active Directory
Bazat pe OU
Înlocuiți „domain.local/OU/OU” cu propriul nume de domeniu și OU de care aveți nevoie de o colecție.
select * from SMS_R_System where LOWER(SMS_R_System.SystemOUName) = "domain.local/OU/OU"
Bazat pe multe OU imbricate
În cazul în care aveți multe structuri OU repetate (un nume de OU există în multe alte OU, de exemplu Stații de lucru). Înlocuiți „domain.local/%/Workstations” cu propriul nume de domeniu și OU de care aveți nevoie de o colecție de.
select * from SMS_R_System where SMS_R_System.SystemOUName like "domain.local/%/Workstations"
Bazat pe apartenența la domeniu.
Înlocuiți „domeniul” cu numele NetBIOS al domeniului dvs.
select * from SMS_R_System where SMS_R_System.ResourceDomainORWorkgroup = "domain"
Colecții de stații de lucru
Toate stațiile de lucru
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation%"
Toate Windows 10
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 10.0%"
Toate Windows 10 noiembrie 2019 Actualizare 19H2 (1909)
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "18363"
Toate Windows 10 Mai 2019 Actualizare 19H1 (1903)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "18362"
Toate Windows 10 octombrie 2018 Actualizați (1809)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "17763"
Toate Windows 10 Aprilie 2018 Actualizați (1803)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "17134"
Toate Windows 10 Actualizarea creatorilor de toamnă (1709)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "16299"
Toate Windows 10 Actualizarea creatorilor (1703)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "15063"
Toate Windows 10 Actualizare aniversară (1607)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "14393"
Toate Windows 10 Actualizare noiembrie (1511)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "10586"
Toate Windows 10 RTM (1507)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "10240"
Toate Windows 8.1
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
where SMS_R_System.OperatingSystemNameandVersion like "select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 6.3%"
Toate Windows 7
Această interogare trebuie să fie limitată la Toate stațiile de lucru colectarea la lucru.
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 6.1%"
Toate Windows Vista
Această interogare trebuie să fie limitată la Toate stațiile de lucru colectarea la lucru
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System
where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 6.0%"
Toate Linux
Select SMS_R_System.ClientEdition from SMS_R_System where SMS_R_System.ClientEdition = 13
Toate Mac OS
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Mac%"
Pe baza modelului producătorului computerului.
În acest exemplu, primim pe toate Dell posturi de lucru.
select distinct SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_COMPUTER_SYSTEM.Model
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.Model = "Dell"
Colecții de server
Toate controlerele de domeniu
Această interogare necesită ca Clientul SCCM este instalat iar inventarul hardware este activat.
select * 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.Roles like "%Domain_Controller%"
Toate serverele
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server%"
sau
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Server"
Toate Windows 2019 Servere
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Name like "Microsoft Windows Server 2019 %"
Toate Windows 2016 Servere
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server 10.0%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server 10.0%"
Toate Windows 2012 Servere R2
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server 6.3%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server 6.3%"
Toate Windows 2012 Servere
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server 6.2%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server 6.2%"
Toate Windows 2008 Servere R2
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server 6.1%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server 6.1%"
Toate Windows 2008 Servere
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_System.OperatingSystemNameandVersion,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Server 6.0%"
OR SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Advanced Server 6.0%"
Colecții SQL Server
Toate serverele SQL
select * 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.Roles like "%SQLServer%"
Toate SQL Server Management Studio instalate
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft SQL Server Management Studio %"
Toate SQL Server Management Studio v17 sunt instalate
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft SQL Server Management Studio - 17%"
Toate serverele SQL 2017
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName = "Microsoft SQL Server 2017"
Toate serverele SQL 2016
select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft SQL Server 2016"
Toate serverele SQL 2014 (x64)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft SQL Server 2014 (64-%"
Toate serverele SQL 2012 (x64)
select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft SQL Server 2012 (64-%"
Colecții de rețea
Bazat pe subrețeaua IP
SELECT SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client
FROM SMS_R_System WHERE SMS_R_System.IPSubnets LIKE '192.168.1[1-9].0'
Pe baza intervalului IP
select *
from SMS_R_System
where SMS_R_System.IPAddresses like "10.10.10.2[1-9]"
Toate sistemele fizice
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.IsVirtualMachine like "False"
Toate sistemele virtuale
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.IsVirtualMachine like "True"
Colecții de software instalate
Toate birourile 365 Pro Plus
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft Office 365 ProPlus %"
Toate birourile 365 Pro Plus 2016 (Birou 365 Pro Plus)
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft Office 365 ProPlus - %" and SMS_G_System_INSTALLED_SOFTWARE.ProductVersion like "16.%"
Toate birourile 365 Pro Plus 2013
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft Office 365 ProPlus - %" and SMS_G_System_INSTALLED_SOFTWARE.ProductVersion like "15.0.%"
Utilizator principal pe dispozitiv
SELECT SMS_R_System.name, SMS_R_User.UniqueUserName
FROM SMS_R_System
INNER JOIN SMS_UserMachineRelationship ON SMS_UserMachineRelationship.ResourceId = SMS_R_System.ResourceId
JOIN SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName = SMS_R_User.UniqueUserName
WHERE
SMS_UserMachineRelationship.Types = 1
Listați toate site-urile web IIS
SELECT SMS_R_System.Name, SMS_R_System.LastLogonUserName, SMS_R_System.IPAddresses, IISWebServer.SiteName FROM SMS_R_System INNER JOIN IISWebServer ON SMS_R_System.ResourceID = IISWebServer.ResourceID
Numai dispozitivele active cu nume de gazdă care se termină cu „0” sau „1”
SELECT SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client FROM SMS_R_System WHERE SMS_R_System.Name like '%0' OR SMS_R_System.Name like '%1' AND SMS_R_System.Active = 1
Mesajele de stat ale clienților nu au fost raportate mai mult de 10 zile
SELECT DISTINCT SYS.Name0, MAX(SM.RecordTime) as 'Last State Message Time' FROM v_StateMessage SM JOIN v_R_System SYS on SYS.ResourceID = SM.MachineID WHERE SM.RecordTime < DATEADD(day, -10, GETDATE()) GROUP BY SYS.Name0 ORDER BY SYS.Name0
Stații de lucru care sunt offline pentru mai mult de 30 zile
SELECT Name0, SMS_G_System_SYSTEM.Name, LastHWScan FROM SMS_R_System JOIN SMS_G_System_SYSTEM ON SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceID WHERE LastHWScan < DATEADD(day, -30, GETDATE()) AND SMS_R_System.OperatingSystemNameAndVersion LIKE '%Workstation%' AND SMS_R_System.Client = 1 AND SMS_R_System.Active = 1
Actualizare specifică kb instalată sau neinstalată
SELECT DISTINCT SYS.Name0, UA.Status FROM v_Update_ComplianceStatus AS UC JOIN v_UpdateInfo AS UI ON UC.CI_ID = UI.CI_ID JOIN v_R_System AS SYS ON SYS.ResourceID = UC.ResourceID JOIN v_GS_UpdateAssignment AS UA ON UA.AssignmentID = UC.AssignmentID WHERE UI.ArticleID = '<update KB>' AND SYS.Operating_System_Name_and0 LIKE '%Workstation%'
Calculatoare care au instalată o anumită aplicație bazată pe Microsoft Store
SELECT DISTINCT SYS.Name0, APPM.DisplayName0 FROM v_R_System SYS JOIN v_Add_Remove_Programs ARP ON SYS.ResourceID = ARP.ResourceID JOIN v_AppMan_Application APPM ON ARP.DisplayName0 = APPM.DisplayName0 WHERE APPM.DisplayName0 = '<application name>'
VĂ RUGĂM SĂ REȚINEȚI: Nu mai lucrez cu SCCM, Nu actualizez această pagină, și nu te pot ajuta cu cereri. Utilizați ChatGPT sau lăsați un comentariu, poate te poate ajuta cineva.
Multumesc, foarte util !
Perfect!
Încerc să găsesc o interogare SQL pentru a returna utilizatorul principal și mașina, dar până acum tot ce pot găsi este pentru 2012 iar interogările nu funcționează pentru ramura curentă. Am ceva de genul asta?
Utilizați această interogare. Testat pe cel mai recent CB ConfigMgr 1910:
SELECTează SMS_R_System.name, SMS_R_User.UniqueUserName
DE LA SMS_R_System
INNER JOIN SMS_UserMachineRelationship ON SMS_UserMachineRelationship.ResourceId = SMS_R_System.ResourceId
ÎNSCRIEȚI-vă SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName = SMS_R_User.UniqueUserName
UNDE
SMS_UserMachineRelationship.Types = 1
Excelenta lista, ar dori să aibă o interogare care combină afinitatea dispozitivului utilizator folosind numele afișat, marca și modelul hardware-ului, și include ultimul ciclu de politică al dispozitivului. Pot găsi separat dar, nu se pot combina interogările pentru a rula în interogarea sccm.
numele complet de conectare Nume gazdă data marcă/model
Jane Doe jdoe Finance12 Dell Lat 5290 4/2/2020
Încerc să găsesc o interogare SQL pentru a verifica o aplicație lipsă într-o colecție OU și apoi să instalez aplicația lipsă. Care este procesul de a crea prima colecție și apoi de a face publicitate aplicației la prima colecție?
Bună. Îmi pare rău, dar nu puteți realiza acest lucru cu interogarea SQL în sine, trebuie să utilizați Configuration Manager PowerShell pentru a face asta. Ceva de genul:
1. Obțineți lista de aplicații;
2. Obțineți informații despre colecție;
3. Apoi puteți folosi {dacă … altfel} pentru a verifica fiecare aplicație din colecția ta.
Poate exista o soluție mai bună sau un proces PowerShell mai bun.
Top! Mulțumiri
Vă rog să mă ajutați cu o interogare SQL care poate enumera numele computerelor, OS Build unde ar trebui să fie limitat la o anumită colecție.
Bună, aceasta este interogarea pentru a obține nume și versiuni:
selectați SMS_R_System.NetbiosName, SMS_G_System_OPERATING_SYSTEM.BuildNumber de la SMS_R_System, alăturarea internă SMS_G_System_OPERATING_SYSTEM pe SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId
Dacă trebuie să îl rulați din sql, atunci trebuie să-l rulați din tabelul de colecție, sau limitează-l la masă.
Se pare că lista a fost actualizată, dar ar fi grozav dacă versiunile arhivate/moștenite (SQL 2008, Server 2003) sunt adăugate. Si deasemenea, Versiunile Office sunt importante, ca 2010. 2013. 2016 și 2019. Ar fi util să fie incluse și acestea.
Mulțumesc pentru explicație, foarte util
O intrare pentru colecție “Toate serverele”
Server 2019 nu sunt incluse în această colecție
cum să enumerați toate dispozitivele din OU=x, cu numele computerului ca „ABC-%’ folosesc metoda de conectare la distanță D?
de exemplu, utilizatorul a folosit în laptop ABC-1 “Metoda de conectare securizată Pulse”
Utilizatorul B – Laptopul ABC-2 utilizează Cisco-Anyconnect ect.
etc.
Buna ziua,
Lista excelentă, dar caut unul la care nu am răspuns nicăieri. Caut o interogare care să enumere computerele care nu au instalat un anumit software.
De exemplu, Aș dori să aflu lista computerelor care nu au WINZIP instalat pe ele.
Dacă este posibil, cum pot interoga o colecție pentru utilizatori, datele și orele celor care s-au conectat la dispozitivele din colecție între sept 1, 2020 și iunie 30, 2021?
Ce zici de o interogare care caută un anumit software precum Adobe?
Bună! Încerc să listez toate VM-urile cu Office 2007 instalat. Clienții sunt Windows 10. Am încercat o mulțime de interogări de pe web. Dar nimic nu funcționează. Poate ai o idee? MERSI)
Bună. Incearca asta:
selectați SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Nume,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client de la SMS_R_System se alătură SMS_G_System_INSTALLED_SOFTWARE pe SMS_G_System_INSTALLED_SOFTWARE.ResourceId = SMS_R_System.ResourceId unde sau SMS_G_System_INSTALLED_SOFTWARE.ProductName = “Microsoft Office Professional Plus 2007”
Bun ziua,
În primul rând, vă mulțumesc, toate cererile dumneavoastră sunt cu adevărat grozave.
Întâmpin dificultăți în a crea o interogare în prezent….
Aș dori să știu dacă este posibil să am o întrebare care îmi revine doar la mine 100 postări care se termină cu %0 ?
multumesc in avans pentru ajutor
Cdt
Coisser Jean-Sébastien
Bună. Răspunsul la întrebarea dvs. poate fi găsit pe forumurile TechNet:
“Adăugați o valoare DWORD numită „ValueLimit’ la
HKEY_Local_MachineSOFTWAREMicrosoftConfigMgrAdminUIQueryProcessors
și setați la # de rânduri pe care doriți să le afișați.
Rețineți că este posibil să aveți deja această valoare adăugată, după cum se spune, implicit este 2,000, nu 20,000. Dacă da, doar modificați numărul de rânduri pe care doriți să le returnați. in orice caz, Cred că aici există o limită de memorie, deci este posibil să nu primești totuși lista, in functie de cate valori ai.”
O alta solutie – utilizați colecții mai mici
Există o interogare SQL pentru listarea computerelor care au instalată o anumită aplicație bazată pe Microsoft Store?
selectați distinct
SMS_R_System.Name,
SMS_G_System_SoftwareFile.FileName,
SMS_G_System_SoftwareFile.FilePath,
SMS_G_System_SoftwareFile.FileSize,
SMS_G_System_SoftwareFile.ModifiedDate
din
SMS_R_System
unire internă SMS_G_System_SoftwareFile pe SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId
Unde
SMS_G_System_SoftwareFile.FilePath ca “c:\\utilizatori\%roaming%”
Vă rog să mă ajutați cu o întrebare pentru a verifica dacă folderul este disponibil în cale
Bună. Încercați să utilizați c:\utilizatori*%appdata%, %datele aplicatiei%, *\%datele aplicatiei%. Ce încerci să obții? După cum am înțeles, încercați să verificați dacă fiecare utilizator are un folder de roaming? Nu există %roaming% utilizare %appdata%
putem crea o colecție bazată pe o anumită actualizare kb instalată sau neinstalată …
mulțumesc
Bună. Nu există o modalitate simplă de a face asta. Utilizați Inventarul hardware și extinderea soluției Quick Fix Engineering pentru a realiza acest lucru
Este posibil să creați o interogare, toate ferestrele 10 afișează dispozitivele dintr-un anumit departament?
Salut. Doar dacă aveți o astfel de unitate organizatorică sau un atribut unic de computer în Active Directory
BUNA ZIUA
AM NEVOIE DE INTERBARE PENTRU STAȚII DE LUCRU CARE SUNT OFFLINE MAI MULT DE 30 ZILE
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Nume,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client de la SMS_R_System unde SMS_R_System.Name în ( selectați Nume din SMS_R_System unde ((DATEDIFF(zi, SMS_R_SYSTEM.AgentTime, getdate()) >=30) și AgentName = „SMS_AD_SYSTEM_DISCOVERY_AGENT”) ) și SMS_R_System.Name în ( selectați Nume din SMS_R_System unde ((DATEDIFF(zi, SMS_R_SYSTEM.AgentTime, getdate()) >=30) și AgentName = „Descoperirea bătăilor inimii”))
Încerc să întreb 2 domenii pentru a crea colecții de utilizatori cu membri din ambele. Este posibil ?
Bună. Este posibil, ce interogare folosesti?
Salut Andrej,
Mulțumiri, post foarte util…mă puteți ajuta să construiesc o interogare care să arate regulile de membru al unui anumit ID de colecție.
Bună ziua, Încerc să creez o interogare care mă returnează, aparate care au ferestre 10 întreprindere instalată, nu pot…Mă puteți ajuta
Am nevoie de o interogare de colectare pentru că mesajele de stare ale clienților nu au raportat mai mult de 10 zile
foarte bun, M-ați putea ajuta cu o întrebare care să-mi dea numele echipelor?, utilizatorii și sistemul de operare?
Doar nu comenta gândurile mele, ci răspunde la o întrebare.
De ce o interogare OU, care conține exact calea, Clienții indică un OU părinte.
Resursa sistemului – Sistemul OU este egal cu domain.ou1.ou2. Clienții din OU1 sunt, de asemenea, afișați.
Buna ziua, Nu mai lucrez cu SCCM, așa că nu vă pot răspunde la întrebare, dar vă sugerez să încercați “Bazat pe multe OU imbricate” interogare cu modificări pentru nevoile dumneavoastră.
Bună ziua, Aș dori o interogare de unde să pot obține lista de servere și ultimul lor patch, ar fi posibil.
Salutari.
Are cineva un exemplu de interogare care afișează NUMAI dispozitive active cu nume de gazdă care se termină în “0” sau “1”? Foarte apreciat
Bun ziua,
ce tip de interogare ar trebui să introduc pentru a instala aplicațiile în appdata/local ? este doar posibil ?
Mulţumesc anticipat !
Mulțumesc foarte mult!
Cum arată o interogare?, PC-urile incluse, care nu au un client activ dar s-au autentificat în domeniu în ultima săptămână?
Unele dintre computerele mele cad din rețea când sunt distribuite actualizări!
Mulțumesc!
Îmi puteți spune cum să creez un raport în SCCM pentru tot serverul web IIS și conținutul web?
Aș dori să am o listă cu toate site-urile web din raportul SCCM.