Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $deviceList = @{
- GPU_IrisXe = "PCI\VEN_8086&DEV_9A4";
- TouchPanel = "HID\GDIX1002";
- TouchPanel_Driver = "ACPI\GDIX1002";
- WiFi_AX200 = "PCI\VEN_8086&DEV_2723";
- SoundCard = "INTELAUDIO\FUNC_01&VEN_10EC&DEV_0269&SUBSYS_12970000";
- Fingerprint = "ACPI\FTE3600";
- }
- $cpuVariants = "i7-1165G7", "i5-1135G7"
- ###############################################################################
- # Do not change anything below this line
- ###############################################################################
- $requiredCPU = $cpuVariants | Out-GridView -OutputMode Single -Title "Select CPU Variant"
- $mismatches = 0
- if($cpuVariants.Contains($requiredCPU)) {
- $cpuInfo = Get-PnpDevice -FriendlyName "*$($requiredCPU)*"
- if(($cpuInfo | measure).Count -gt 0) {
- Write-Host -ForegroundColor Green "[ OK ] CPU (Intel $($requiredCPU))"
- } else {
- $mismatches++
- Write-Host -ForegroundColor Red "[MISS] CPU (Intel $($requiredCPU))"
- }
- } else {
- Write-Host -ForegroundColor Red "[ERRO] Invalid CPU model selected."
- exit
- }
- $connectedDevices = Get-PnpDevice | Select -ExpandProperty DeviceID
- foreach($device in $deviceList.GetEnumerator()) {
- $match = $false
- foreach($cDev in $connectedDevices) {
- if($cDev.StartsWith($device.Value)) {
- $match = $true
- break
- }
- }
- if($match) {
- Write-Host -ForegroundColor Green "[ OK ] $($device.Key) ($($device.Value))"
- } else {
- $mismatches++
- Write-Host -ForegroundColor Red "[MISS] $($device.Key) ($($device.Value))"
- }
- }
- if($mismatches -gt 0) {
- Write-Host -ForegroundColor Red "`n`nThe installed hardware is not correct or defective!"
- Write-Host -ForegroundColor Red "Contact $($contactAdress)"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement