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/Power/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : C:/Windows/diagnostics/system/Power/TS_ScreenBrightness.ps1
# Copyright � 2008, Microsoft Corporation. All rights reserved.


#Localization Data
Import-LocalizedData -BindingVariable localizationString -FileName Power_Troubleshooter

# Break on uncaught exceptions
trap {break}

. .\Powerconfig.ps1

#check screen brightness
function checkScreenBrightness
{
        Write-DiagProgress -activity $localizationString.Check_ScreenBrightness

        [bool]$result = $true
        if(-not(IsLaptop) -or -not(IsVideoDim))
        {
            return $result
        }

        $subgroupguid = "7516b95f-f776-4464-8c53-06167f40cc99"
        $settingguid = "aded5e82-b909-4619-9949-f5d71dac0bcb"

        $DC_settingvalue = Getpowersetting $false $subgroupguid $settingguid
        $DC_settingvalue_default = GetDefaultpowersetting $false $subgroupguid $settingguid
        $access_DC = CheckPowerSettingAccess $false $settingguid

        if($DC_settingvalue -ne $null)
        {
            if((($DC_settingvalue -gt $DC_settingvalue_default) -and $access_DC))
            {
                $result = $false
            }
        }

        return $result
}

if((checkScreenBrightness) -eq $false)
{
    Update-DiagRootCause -id RC_ScreenBrightness -Detected $true
}
else
{
    Update-DiagRootCause -id RC_ScreenBrightness -Detected $false
}

Anon7 - 2021