KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT SERVER-PC 10.0 build 26200 (Windows 11) AMD64
User : ServerPC ( 0)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  C:/Windows/diagnostics/system/Bluetooth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : C:/Windows/diagnostics/system/Bluetooth/RC_DriverProblem.ps1
# Copyright © 2016, Microsoft Corporation. All rights reserved.
# :: ======================================================= ::
# This script is invoked either from TS_Main.ps1 or from Troubleshooter (msdt.exe)
# TS_Main.ps1 passes only $problemDeviceID parameter whereas msdt will pass both $problemDeviceID and $action (as 'Verify')
# This script is to detect Known error codes defined in CL_Utility.ps1

Param($problemDeviceID, $action)
#====================================================================================
# Initialize
#====================================================================================
Import-LocalizedData -BindingVariable Strings_RC_DriverProblem -FileName CL_LocalizationData
[bool]$detected = $false
#====================================================================================
# Load Utilities
#====================================================================================
. ./CL_Utility.ps1

#====================================================================================
# Main
#====================================================================================
Write-DiagProgress -Activity $Strings_RC_DriverProblem.ID_PROG_DriverProblems

if(![string]::IsNullOrWhiteSpace($problemDeviceID))
{
    $problemDevice = (Get-WmiObject -Class CIM_LogicalDevice | ? {($_.DeviceID  -eq $problemDeviceID)})
    $problemDeviceName = $problemDevice.Name
    $errorCode =  $problemDevice.ConfigManagerErrorCode
    if($knownErrorCodes.Keys -contains $errorCode)
    {
        $detected = $true
    }
}

[string]$propertyName = ''

if($detected)
{
    Update-DiagRootCause -ID 'RC_DriverProblem' -IID $problemDeviceID -Detected $detected -Parameter @{'ProblemDeviceID'= $problemDeviceID; 'ProblemDeviceName'= $problemDeviceName}
    $propertyName = "DetectedDeviceError"
}
else
{
    if ($action -eq 'Verify')
    {
        Update-DiagRootCause -ID 'RC_DriverProblem' -IID $problemDeviceID -Detected $detected -Parameter @{'ProblemDeviceID'= $problemDeviceID; 'ProblemDeviceName'= $problemDeviceName}
        $propertyName = "VerifyDeviceError"
    }
}

if($propertyName.Length -gt 0)
{
    GetDeviceInfoAndWriteTrace $problemDeviceID $propertyName
}

return $detected

Anon7 - 2021