SQL Query BIOS PASSWORD ON SYSTEMS (Dell and HP)

, , , , ,

Prior to deploying the proprietary client tools described in the sections below, it is helpful to first identify which systems have administrator and/or system passwords configured because some of the tools’ functionality will fail if these passwords are set and not used during deployment.In order to use certain proprietary management tools to make changes to the BIOS/UEFI settings, it is necessary to determine which systems are currently configured to require passwords before settings can be modified. The queries will identify systems that need a password.

Dell

Select
sys.Name0,
DBP.AttributeName0,
ElementName0,
DBP.IsSet0
from
v_GS_DCIM_BIOSPASSWORD0 DBP
Inner Join
V_R_System sys on sys.ResourceID = DBP.ResourceID
Where DBP.IsSet0 = ‘1’
Order By sys.Name0, DBP.AttributeName0

HP

Select
sys.Name0,
HPBP.Name0,
HPBP.IsSet0
from
v_GS_HPBIOS_BIOSPASSWORD HPBP
Inner Join
V_R_System sys on sys.ResourceID = HPBP.ResourceID
Where HPBP.IsSet0 = ‘1’
Order By sys.Name0, HPBP.Name0

 

ALSO SEE : Secondary Site stuck in “Deleting” state

Windows 10 Migration Project (General Starter Queries)

, , , , , , , ,

For my one of my customers environments the move towards windows 10 will be purely security based.
The key features that will be used are UEFI boot w/ Secure-boot enabled, ELAM, Device Guard, and Credential Guard (explanation of features in future blog post)

When starting any operating system deployment project, it is a good idea to know what systems are in your environment so that you can determine which of these systems need to support the new Windows 10 OS.Some systems may need to be replaced, whereas others might only need a BIOS version update to be UEFI capable
Now that Windows 10 is here, now is the time to standardize on native UEFI as the default boot mode. When making this switch, it is also important to enable Secure Boot at the same time. But, before you can do that, you need to determine what is in your environment.In a previous customers environment there were 15 different manufacturers and 350+ different models. Since this environment has such a high number of manufactures we will not be able to deploy bios tools for all 15. We will
chose to run a brief SQL Query to guesstimate systems capable based on the PC Bios Date.

1. Query to identify system manufacturer and model machines
select 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

Create collections based on different manufacturers. My previous query resulted in 15 different manufacturers. I will below only provide queries for major vendors. Please note some vendors will have more than 1 name used. For example dell systems us “Dell” Dell Inc” and Dell Computer Corporation” so just use the Like value and %Dell% to obtain all systems from this manufacturer. Other companies you need to use the Like %Hewlett-Packard%” or like %HP%

Some of these collections will be used for deploying BIOS tools against to identify certain key pieces of information for future queries that we will build upon. In a future blog we will cover how to extend hardware inventory to grab newly created WMI namespaces.

2. Dell
select SMS_R_System.Name 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.Manufacturer like “%Dell%”

3. HP
select distinct SMS_R_System.Name 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.Manufacturer like “%Hewlett-Packard%” or SMS_G_System_COMPUTER_SYSTEM.Manufacturer like “%HP%”

4. Lenovo
select SMS_R_System.Name 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.Manufacturer like “%LENOVO%”

5. Transource
select SMS_R_System.Name 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.Manufacturer like “Transource”

6. Query SQL for count of System Models
SELECT
Manufacturer0, Model0, Count(Model0) AS ‘Count’
FROM
dbo.v_GS_COMPUTER_SYSTEM
GROUP BY
Manufacturer0,Model0
ORDER BY
Model0

BONUS (Meets Physical SPECS + TPM 1.2 and up

Criteria: 2gb ram, 1ghz processor, 120gb HD, TPM 1.2 (run in SCCM Console)

select SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_COMPUTER_SYSTEM.Model, SMS_G_System_SYSTEM.Name, SMS_G_System_TPM.PhysicalPresenceVersionInfo, SMS_R_System.ResourceId from SMS_R_System inner join SMS_G_System_X86_PC_MEMORY on SMS_G_System_X86_PC_MEMORY.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_PROCESSOR on SMS_G_System_PROCESSOR.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_DISK on SMS_G_System_DISK.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_TPM on SMS_G_System_TPM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory > 2000000 and SMS_G_System_PROCESSOR.MaxClockSpeed > 1000 and SMS_G_System_DISK.Size >= 120000 and SMS_G_System_TPM.PhysicalPresenceVersionInfo >= “1.2”

ALSO SEE : Windows 10 Migration Project (How to start)