⚡ PowerShell 5.1+
Check "Show Hidden Files" Status
Reads the current registry value behind the "Show Hidden Files" tweak so you can confirm whether it's applied.
Test-ShowHiddenFilesGlobalStatus.ps1
<#
.SYNOPSIS
Checks whether "Show Hidden Files" is currently applied.
.DESCRIPTION
Reads HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced \ Hidden and reports its current value,
or reports that it isn't set (falling back to the Windows default).
.EXAMPLE
.\Test-ShowHiddenFilesGlobalStatus.ps1
#>
[CmdletBinding()]
param()
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
$value = Get-ItemProperty -Path $regPath -Name 'Hidden' -ErrorAction SilentlyContinue
if ($null -eq $value) {
Write-Host "'Hidden' is not set at $regPath (using the Windows default)." -ForegroundColor Yellow
} else {
Write-Host "Current value of 'Hidden': $($value.'Hidden')" -ForegroundColor Green
}