Gestore della configurazione Elenco raccolte di query. Tutte le query sono state testate.
Raccolte di client di Configuration Manager
Clienti non approvati
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"
Client che richiedono un riavvio
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
Tutti i computer client SCCM con meno di 5 GB di spazio libero su disco su 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
Tutti gli oggetti informatici con il client installato nello specifico sito “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
Tutti i computer senza 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"
Raccolte di Active Directory
Basato su UO
Sostituisci "domain.local/OU/OU" con il tuo dominio nome e unità organizzativa di cui hai bisogno di una raccolta.
select * from SMS_R_System where LOWER(SMS_R_System.SystemOUName) = "domain.local/OU/OU"
Basato su molte unità organizzative nidificate
Nel caso in cui siano presenti molte strutture di unità organizzative ripetute (un nome di UO esiste in molte altre UO, Per esempio Postazioni di lavoro). Sostituisci "domain.local/%/Workstations" con il tuo dominio nome e unità organizzativa di cui hai bisogno di una raccolta.
select * from SMS_R_System where SMS_R_System.SystemOUName like "domain.local/%/Workstations"
In base all'appartenenza al dominio.
Sostituisci "dominio" con il nome NetBIOS del tuo dominio.
select * from SMS_R_System where SMS_R_System.ResourceDomainORWorkgroup = "domain"
Collezioni di workstation
Tutte le workstation
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%"
Tutte le finestre 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%"
Tutte le finestre 10 novembre 2019 Aggiornamento 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"
Tutte le finestre 10 Maggio 2019 Aggiornamento 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"
Tutte le finestre 10 ottobre 2018 Aggiornamento (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"
Tutte le finestre 10 aprile 2018 Aggiornamento (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"
Tutte le finestre 10 Aggiornamento dei creatori autunnali (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"
Tutte le finestre 10 Aggiornamento dei creatori (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"
Tutte le finestre 10 Aggiornamento anniversario (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"
Tutte le finestre 10 Aggiornamento di novembre (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"
Tutte le finestre 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"
Tutte le finestre 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%"
Tutte le finestre 7
Questa query deve essere limitata a Tutte le workstation raccolta per lavorare.
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%"
Tutto Windows Vista
Questa query deve essere limitata a Tutte le workstation raccolta per lavorare
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%"
Tutto Linux
Select SMS_R_System.ClientEdition from SMS_R_System where SMS_R_System.ClientEdition = 13
Tutti i sistemi operativi Mac
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%"
Basato sul modello del produttore del computer.
In questo esempio, otteniamo tutto Dell postazioni di lavoro.
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"
Raccolte di server
Tutti i controller di dominio
Questa query richiede che il file Il client SCCM è installato E hardware l'inventario è attivato.
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%"
Tutti i server
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%"
O
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"
Tutte le finestre 2019 Server
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 %"
Tutte le finestre 2016 Server
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%"
Tutte le finestre 2012 Server 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%"
Tutte le finestre 2012 Server
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%"
Tutte le finestre 2008 Server 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%"
Tutte le finestre 2008 Server
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%"
Raccolte di SQL Server
Tutti i server 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%"
Tutto SQL Server Management Studio installato
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 %"
Tutto SQL Server Management Studio v17 installato
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%"
Tutti i server 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"
Tutti i server 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"
Tutti i server 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-%"
Tutti i server 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-%"
Collezioni di rete
Basato sulla sottorete 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'
In base all'intervallo IP
select *
from SMS_R_System
where SMS_R_System.IPAddresses like "10.10.10.2[1-9]"
Tutti i sistemi fisici
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"
Tutti i sistemi virtuali
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"
Raccolte di software installato
Tutto Ufficio 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 %"
Tutto Ufficio 365 Pro Plus 2016 (Ufficio 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.%"
Tutto Ufficio 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.%"
Utente principale sul dispositivo
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
Elenca tutti i siti 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
Solo dispositivi attivi con nomi host che terminano con "0" o "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
I messaggi di stato dei client non sono stati segnalati più di 10 giorni
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
Workstation offline da più di 30 giorni
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
KB di aggiornamento specifico installato o non installato
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%'
Computer su cui è installata un'applicazione specifica basata su 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>'
NOTARE CHE: Non lavoro con SCCM più, Non aggiorno questa pagina, e non posso aiutarti con le richieste. Usa ChatGPT o lascia un commento, forse qualcuno può aiutarti.
Grazie, molto utile !
Perfetto!
Sto cercando di trovare una query SQL per restituire l'utente e la macchina primari, ma finora tutto quello che riesco a trovare è per 2012 e le query non funzionano per il ramo corrente. Ho qualcosa del genere?
Usa questa query. Testato sull'ultimo CB ConfigMgr 1910:
SELEZIONARE SMS_R_Sistema.nome, SMS_R_User.UniqueUserName
DA SMS_R_System
INNER JOIN SMS_UserMachineRelationship ON SMS_UserMachineRelationship.ResourceId = SMS_R_System.ResourceId
ISCRIVITI a SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName = SMS_R_User.UniqueUserName
DOVE
SMS_UserMachineRelationship.Types = 1
Elenco eccellente, vorrebbe avere una query che combini l'affinità utente-dispositivo utilizzando il nome visualizzato, marca e modello dell'hardware, e include l'ultimo ciclo di policy del dispositivo. Posso trovarlo separatamente ma, impossibile combinare le query da eseguire nella query sccm.
login con nome completo Nome host, marca/modello, data
Jane Doe jdoe Finance12 Dell Lat 5290 4/2/2020
Sto cercando di trovare una query SQL per verificare la presenza di un'applicazione mancante in una raccolta di unità organizzative e quindi installare l'applicazione mancante. Qual è il processo per creare la prima raccolta e quindi pubblicizzare l'applicazione nella prima raccolta?
CIAO. Scusa, ma non puoi raggiungere questo obiettivo con la query SQL stessa, a tale scopo è necessario utilizzare PowerShell di Configuration Manager. Qualcosa del genere:
1. Ottieni l'elenco delle applicazioni;
2. Ottieni informazioni sulla raccolta;
3. Quindi puoi usare {Se … altro} per controllare ogni applicazione nella tua collezione.
Potrebbe esserci una soluzione migliore o un processo PowerShell migliore.
Superiore! Grazie
Gentilmente aiutami con una query SQL che può elencare i nomi dei PC, Sistema operativo creato dove dovrebbe essere limitato a una raccolta specifica.
CIAO, questa è la query per ottenere nomi e build:
selezionare SMS_R_System.NetbiosName, SMS_G_System_OPERATING_SYSTEM.BuildNumber dal join interno di SMS_R_System SMS_G_System_OPERATING_SYSTEM su SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId
Se è necessario eseguirlo da sql, quindi devi eseguirlo dalla tabella di raccolta, o limitarlo al tavolo.
Sembra che l'elenco sia stato aggiornato, ma sarebbe fantastico se le versioni archiviate/legacy (SQL 2008, Server 2003) vengono aggiunti. E anche, Le versioni di Office sono importanti, Piace 2010. 2013. 2016 E 2019. Sarebbe utile se includessero anche quelli.
Grazie per la tua spiegazione, molto utile
Un input per la Collezione “Tutti i server”
Server 2019 non sono inclusi in questa raccolta
come elencare tutti i dispositivi in OU=x, con nome computer come "ABC-%"’ stanno utilizzando il metodo di connessione remota D?
ad esempio Utente a che utilizza nel laptop ABC-1 “Metodo di connessione sicura a impulsi”
Utente B – Il laptop ABC-2 utilizza Cisco-Anyconnect ecc.
ecc.
Ciao,
Elenco eccellente, ma ne sto cercando uno a cui non ho trovato risposta da nessuna parte. Sto cercando una query che elencherà i computer su cui non è installato un software specifico.
Per esempio, Vorrei conoscere l'elenco dei computer sui quali non è installato WINZIP.
Se possibile, come posso interrogare una raccolta per gli utenti, date e orari di chi ha effettuato l'accesso ai dispositivi della raccolta tra settembre 1, 2020 e giugno 30, 2021?
Che ne dici di una query che cerca un software specifico come Adobe?
CIAO! Sto cercando di elencare tutte le macchine virtuali con Office 2007 installato. I client sono Windows 10. Ho provato molte query dal web. Ma niente funziona. Forse hai un'idea? grazie)
CIAO. Prova questo:
selezionare SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Nome,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client dal join interno di SMS_R_System SMS_G_System_INSTALLED_SOFTWARE su SMS_G_System_INSTALLED_SOFTWARE.ResourceId = SMS_R_System.ResourceId dove o SMS_G_System_INSTALLED_SOFTWARE.ProductName = “Microsoft Office Professional Plus 2007”
Buon giorno,
Innanzitutto grazie, tutte le vostre richieste sono davvero fantastiche.
Al momento ho difficoltà a creare una query….
Vorrei sapere se è possibile avere una domanda che ritorna solo a me 100 post che terminano con %0 ?
Grazie in anticipo per il vostro aiuto
CDT
Coisser Jean-Sébastien
CIAO. La risposta alla tua domanda può essere trovata sui forum TechNet:
“Aggiungi un valore DWORD chiamato "ValueLimit’ A
HKEY_Local_MachineSOFTWAREMicrosoftConfigMgrAdminUIQueryProcessors
e impostare su # di righe che desideri visualizzare.
Tieni presente che potresti già avere quel valore aggiunto, come si suol dire, l'impostazione predefinita è 2,000, non 20,000. Se è così, modifica semplicemente il numero di righe che desideri restituire. Tuttavia, Credo che ci sia un limite di memoria qui, quindi potresti non ottenere ancora l'intero elenco, a seconda di quanti valori hai.”
Altra soluzione – utilizzare raccolte più piccole
Esiste una query SQL per elencare i computer su cui è installata un'applicazione specifica basata su Microsoft Store?
selezionare distinto
SMS_R_System.Nome,
SMS_G_System_SoftwareFile.NomeFile,
SMS_G_System_SoftwareFile.FilePath,
SMS_G_System_SoftwareFile.FileSize,
SMS_G_System_SoftwareFile.ModifiedDate
da
SMS_R_Sistema
inner join SMS_G_System_SoftwareFile su SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId
Dove
SMS_G_System_SoftwareFile.FilePath piace “C:\\utenti\%roaming%”
Per favore aiutami con una query per verificare se la cartella è disponibile nel percorso
CIAO. Prova a usare c:\utenti*%appdata%, %dati app%, *\%dati app%. Quello che cerchi di ottenere? Come ho capito, provi a verificare che ogni utente abbia una cartella di roaming? Non c'è %roaming% usa %appdata%
possiamo creare una raccolta basata su specifici kb di aggiornamento installati o non installati …
Grazie
CIAO. Non esiste un modo semplice per farlo. Per raggiungere questo obiettivo, utilizza l'inventario hardware e l'estensione della soluzione Quick Fix Engineering
È possibile creare una query, il tutto Windows 10 visualizza i dispositivi in un reparto specifico?
Ciao. Solo se disponi di tale unità organizzativa o di un attributo computer univoco in Active Directory
CIAO
HO BISOGNO DI INTERROGARE LE WORKSTATION CHE SONO OFFLINE PER PIÙ DI 30 GIORNI
SMS_R_SYSTEM.IDrisorsa,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Nome,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client da SMS_R_System dove SMS_R_System.Name in ( seleziona Nome da SMS_R_System dove ((DATAIFF(giorno, SMS_R_SYSTEM.AgentTime, getdate()) >=30) e NomeAgente = "SMS_AD_SYSTEM_DISCOVERY_AGENT") ) e SMS_R_System.Nome in ( seleziona Nome da SMS_R_System dove ((DATAIFF(giorno, SMS_R_SYSTEM.AgentTime, getdate()) >=30) e AgentName = "Rilevamento battito cardiaco"))
Sto cercando di fare una domanda 2 domini per creare raccolte di utenti con membri di entrambi. E' possibile? ?
CIAO. È possibile, che query usi??
Ciao Andrej,
Grazie, post molto utile…puoi aiutarmi a creare una query che mostrerà le regole di appartenenza di un ID raccolta specifico.
Buon pomeriggio, Sto cercando di creare una query che mi restituisca, macchine dotate di finestre 10 aziendale installato, Non sono in grado…Mi potete aiutare
Ho bisogno di una query di raccolta per i messaggi di stato dei client che non hanno segnalato più di 10 giorni
Molto bene, Potresti aiutarmi con una query che possa darmi i nomi delle squadre?, utenti e sistema operativo?
Basta non commentare i miei pensieri ma rispondere a una domanda.
Perché una query sull'unità organizzativa, che contiene esattamente path, I client puntano a un'unità organizzativa padre.
Risorse di sistema – L'unità organizzativa del sistema è uguale a dominio.ou1.ou2. Vengono visualizzati anche i client nell'unità organizzativa1.
Ciao, Non lavoro più con SCCM quindi non posso rispondere alla tua domanda, ma ti suggerisco di provare il “Basato su molte unità organizzative nidificate” query con modifiche per le vostre esigenze.
Buon pomeriggio, Vorrei una query in cui posso ottenere l'elenco dei server e la loro ultima patch, sarebbe possibile.
Saluti.
Qualcuno ha un esempio di query che mostra SOLO dispositivi attivi con nomi host che terminano con “0” O “1”? Molto apprezzato
Buon giorno,
che tipo di query devo digitare per ottenere le applicazioni installate in appdata/local ? è solo possibile ?
grazie in anticipo !
Grazie mille!
Che aspetto ha una query?, i PC inclusi, che non hanno un cliente attivo ma hanno effettuato l'accesso al dominio nell'ultima settimana?
Alcuni dei miei computer vengono disattivati quando vengono distribuiti gli aggiornamenti!
Grazie!
Potete dirmi come creare un report in SCCM per tutto il server Web IIS e il contenuto web?
Vorrei avere un elenco di tutti i siti web nel rapporto SCCM.