Turn on filename extensions with PowerShell

A file extension, denoted by a suffix appended to a foundational filename, signifies the specific file format attributed to that foundational filename.

The inclusion of visible filename extensions empowers users to swiftly recognize both the file category and its associated application, thus facilitating prompt detection of potentially deceptive malicious files. Malicious actors might manipulate users by presenting files featuring dual extensions, obscuring the authentic nature of the file. An illustrative instance entails an executable file named Trust_Me.txt.exe, which would be displayed as Trust_Me.txt if filename extensions remain concealed. Such obfuscation might lead users to assume the file is a text document and open it without appropriate precautions. By activating this configuration, the filename will be accurately exhibited as Trust_Me.txt.exe, enabling users to readily discern that it constitutes an executable file.

$RegKey = “HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced”
Set-ItemProperty $RegKey -Name HideFileExt -Type DWord -Value 0

 

Leave a comment

Your email address will not be published. Required fields are marked *

2 + 5 =