[TUTO] – SCCM 2012 : Générer un rapport inventaire hardware via SQL

4
3189

Si vous souhaitez générer très rapidement un rapport inventaire hardware complet de tous vos périphériques gérés par SCCM, voici une requête SQL que j’ai trouvé sur le blog de « http://ammarhasayen.com » et qui vous fournira les informations suivantes :

  • Machine
  • ADSite
  • User name
  • Top User
  • OS
  • Service Pack
  • Manufacturer
  • Model
  • Serial Number
  • BIOS Date
  • BIOS Version
  • Managed Date
  • Memory
  • Memory Slot
  • Type
  • Disk Size GB
  • PC Type

 

SELECT DISTINCT 
sys.Name0 'Machine',
sys.AD_Site_Name0 'ADSite',
CS.UserName0 'User Name',
CASE
    WHEN U.TopConsoleUser0 = '-1' OR U.TopConsoleUser0 IS NULL THEN 'N/A'
    ELSE U.TopConsoleUser0
END as TopUser,
REPLACE (OS.Caption0, 'Microsoft Windows','Win') OS,
REPLACE (OS.CSDVersion0,'Service Pack','SP') 'Service Pack',
CS.Manufacturer0 'Manufacturer',
CS.Model0 Model,
BIOS.SerialNumber0 'Serial Number',
BIOS.ReleaseDate0 as BIOSDate,
BIOS.SMBIOSBIOSVersion0 as BIOSVersion,
(SELECT CONVERT(DATE,sys.Creation_Date0)) 'Managed Date',
SUM(ISNULL(RAM.Capacity0,0)) 'Memory (MB)',
COUNT(RAM.ResourceID) '# Memory Slots',
REPLACE (cs.SystemType0,'-based PC','') 'Type',
SUM(D.Size0) / 1024 AS 'Disk Size GB',
CASE SE.ChassisTypes0
  when '1' then 'Other'
  when '2' then 'Unknown'
  when '3' then 'Desktop'
  when '4' then 'Low Profile Desktop'
  when '5' then 'Pizza Box'
  when '6' then 'Mini Tower'
  when '7' then 'Tower'
  when '8' then 'Portable'
  when '9' then 'Laptop'
  when '10' then 'Notebook'
  when '11' then 'Hand Held'
  when '12' then 'Docking Station'
  when '13' then 'All in One'
  when '14' then 'Sub Notebook'
  when '15' then 'Space-Saving'
  when '16' then 'Lunch Box'
  when '17' then 'Main System Chassis'
  when '18' then 'Expansion Chassis'
  when '19' then 'SubChassis'
  when '20' then 'Bus Expansion Chassis'
  when '21' then 'Peripheral Chassis'
  when '22' then 'Storage Chassis'
  when '23' then 'Rack Mount Chassis'
  when '24' then 'Sealed-Case PC'
  else 'Undefinded'
END AS 'PC Type'
FROM
 v_R_System SYS
INNER JOIN (
     SELECT
      Name0,
      MAX(Creation_Date0) AS Creation_Date
     FROM
     dbo.v_R_System
    GROUP BY
     Name0
) AS CleanSystem
ON SYS.Name0 = CleanSystem.Name0 and sys.Creation_Date0 = CleanSystem.Creation_Date
 LEFT JOIN v_GS_COMPUTER_SYSTEM CS
ON sys.ResourceID=cs.ResourceID
 LEFT JOIN v_GS_PC_BIOS BIOS
ON sys.ResourceID=bios.ResourceID
 LEFT JOIN (
     SELECT
      A.ResourceID,
      MAX(A.[InstallDate0]) AS [InstallDate0]
     FROM
      v_GS_OPERATING_SYSTEM A
     GROUP BY
      A.ResourceID
) AS X
ON sys.ResourceID = X.ResourceID
 INNER JOIN v_GS_OPERATING_SYSTEM OS
ON X.ResourceID=OS.ResourceID and X.InstallDate0 = OS.InstallDate0
 LEFT JOIN v_GS_PHYSICAL_MEMORY RAM
ON sys.ResourceID=ram.ResourceID
 LEFT OUTER join dbo.v_GS_LOGICAL_DISK D
ON sys.ResourceID = D.ResourceID and D.DriveType0 = 3
 LEFT outer join v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP U
ON SYS.ResourceID = U.ResourceID
 LEFT JOIN dbo.v_GS_SYSTEM_ENCLOSURE SE on SYS.ResourceID = SE.ResourceID
 LEFT JOIN dbo.v_GS_ENCRYPTABLE_VOLUME En on SYS.ResourceID = En.ResourceID
 
GROUP BY
  sys.Creation_Date0, sys.Name0,
  sys.AD_Site_Name0 , CS.UserName0 ,REPLACE (OS.Caption0, 'Microsoft Windows','Win') , REPLACE (OS.CSDVersion0,'Service Pack','SP') ,
  CS.Manufacturer0 , CS.Model0 ,BIOS.SerialNumber0 , REPLACE (cs.SystemType0,'-based PC',''),
CASE
  WHEN U.TopConsoleUser0 = '-1' OR U.TopConsoleUser0 IS NULL THEN 'N/A'
  ELSE U.TopConsoleUser0
END,
CASE SE.ChassisTypes0
  when '1' then 'Other'
  when '2' then 'Unknown'
  when '3' then 'Desktop'
  when '4' then 'Low Profile Desktop'
  when '5' then 'Pizza Box'
  when '6' then 'Mini Tower'
  when '7' then 'Tower'
  when '8' then 'Portable'
  when '9' then 'Laptop'
  when '10' then 'Notebook'
  when '11' then 'Hand Held'
  when '12' then 'Docking Station'
  when '13' then 'All in One'
  when '14' then 'Sub Notebook'
  when '15' then 'Space-Saving'
  when '16' then 'Lunch Box'
  when '17' then 'Main System Chassis'
  when '18' then 'Expansion Chassis'
  when '19' then 'SubChassis'
  when '20' then 'Bus Expansion Chassis'
  when '21' then 'Peripheral Chassis'
  when '22' then 'Storage Chassis'
  when '23' then 'Rack Mount Chassis'
  when '24' then 'Sealed-Case PC'
  else 'Undefinded'
END ,
 
BIOS.ReleaseDate0 ,
BIOS.SMBIOSBIOSVersion0
 
ORDER BY sys.Name0

 

Source : ammarhasayen

4 Commentaires

  1. Find the ultimate gastronomic dining experience at Crown Perth’s all-you-can-eat buffets.

    For players seeking something to spice the usual game up, Rapid Roulette and Vegas Star Roulette are a key attractions offered at the casino.
    The floor offers both low-stakes and high-stakes table games for all types of players –
    casuals, high rollers, VIPs, and so on.
    Crown Metropol is a vibrant and distinctly different hotel located in the bustling heart of Crown Perth.
    From world-famous fine dining restaurant Nobu, to contemporary French cuisine at Bistro Guillaume, visitors of Crown Perth are spoilt for choice.

    Enjoy a relaxing morning with a hotel breakfast buffet, or treat yourself to an afternoon beverage at the hotel bar.
    Whether you are a guest at the hotel or looking for a place to enjoy
    a meal, Crown Perth caters for all. With a range of unique experiences, venues and live shows on offer
    all year round.
    Just show your Crown Rewards Card when you pay or play
    and you can start earning Points, which you can redeem for Crown experiences like dining, gaming,
    hotel stays and much more. From acclaimed restaurants
    and award-winning hotels to world-class gaming and endless entertainment,
    Crown Rewards helps you to discover the world of Crown – and be
    rewarded. Crown Perth offers a spectacular array of world-class restaurants and
    fine dining experiences.

    References:
    https://blackcoin.co/ruby-fortune/

  2. Casino Guru stellt Kontaktinformationen zu Organisationen bereit, die auf
    Spielsucht spezialisiert sind. Ein hoher RTP (96 % oder mehr) steigert langfristig die Wahrscheinlichkeit, einen Großteil Ihres Einsatzes zurückzugewinnen. Sie analysieren Informationen aus verschiedenen Quellen, prüfen Spielerbewertungen, ziehen Auszahlungsverläufe heran und verifizieren Lizenzdaten. Im FAQ-Bereich und in den Anleitungen finden sich
    grundlegende Informationen zu Registrierung, Verifizierung, Spielauswahl und Finanztransaktionen. Guru Casino ist nicht nur ein Aggregator von Bewertungen und
    Rezensionen, sondern auch eine Kommunikationsplattform,
    auf der Spielerinnen und Spieler Erfahrungen austauschen, Fragen stellen und Support erhalten können.
    Bei den Bonusspielen werden die glücklichen Spieler durch einen Schwall von Sauerstoffblasen durch die dunkle Tiefsee
    begleitet. Für viele ist die Möglichkeit,
    „on the go“ zu spielen, ein entscheidendes Auswahlkriterium.

    Wenn zum Beispiel ein 100-USD-Bonus eine 30-fache Umsatzbedingung hat, müssen insgesamt 3000 USD gesetzt werden, um den Bonus freizuspielen. Casino Guru ruft zu
    Wachsamkeit und realistischem Handeln auf, damit Online-Casinos eine
    Form der Unterhaltung bleiben und nicht zur Belastung werden.Jetzt spielen! Für viele ist die Möglichkeit,
    „on the go“ zu spielen, ein entscheidendes Auswahlkriterium.App herunterladenDie meisten modernen Online-Casinos haben responsive Websites, die sich automatisch an die Bildschirmgröße von Smartphones oder Tablets anpassen. Casino Guru hilft, diese Vielfalt zu strukturieren und erklärt die wichtigsten Merkmale jeder Kategorie.Hier spielen!

    References:
    https://online-spielhallen.de/1-go-casino-bonus-sicherheit-spiele-2025/

  3. Offering your house for funds and flipping real estate for gain can be an superb approach to produce revenue in the real estate market, but it demands thorough organization and readiness. Start by accurately evaluating your estate’s market worth, which you can attain through certified appraisals, contrasts with comparable estates, or online appraisal resources. Accurate valuing is essential to circumvent monetary deficits or prolonged selling periods. Consulting a real estate broker can give valuable guidance to aid you establish a reasonable and accurate price reflecting existing marketplace trends.

    Before marketing your house for funds, emphasize on making necessary repairs and upgrades, especially in critical areas like the cooking area and washrooms, which can significantly boost your property’s price and appeal. Verifying that your home is clean and clean is critical to attracting potential buyers fast. Furthermore, presenting your house by organizing, arranging furniture thoughtfully, and introducing tasteful decor can create an welcoming ambiance that enhances purchaser appeal. Engaging a licensed house stager can moreover enhance your home’s appearance.

    For those aiming to revolve properties for gain, getting the appropriate investment is crucial. Choices such as conventional lender funds, alternative loans, and individual credits are obtainable, and it’s necessary to choose one that fits with your monetary situation and venture demands. Confirm you have a robust repayment strategy in order. Working with the proper professionals, including real estate brokers, contractors, assessors, and attorney experts, is vital for a profitable house flipping project. These specialists can aid in discovering the right home, handling repairs, examining estate state, and handling legal issues, guaranteeing a efficient and profitable revolving process. For extra insights and resources on this subject, kindly check my favorite page.

    Those that happen to wish to gain knowledge of more about your focus check a internet-site:

    avoid foreclosure georgia

    What to Do When You Need to Sell a House That Needs Repairs 519542f

LAISSER UN COMMENTAIRE

S'il vous plaît entrez votre commentaire!
S'il vous plaît entrez votre nom ici