Viewing other types of file containing simple text in Windows

To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker, purchase my 3D plans, or make a donation or subscribe on Ko-Fi. Thank you!

Hello,

It is possible to view other types of files containing simple text such as .ps1, .psm1, .psd1, .twig, .gcode… in Windows File Explorer.

Powershell code

# Remember to change the extension in the commands, '.ps1' and '.twig' in the examples.
# Settings for the current user
Set-ItemProperty HKCU:\Software\Classes\.ps1 -Name PerceivedType -Value text
# If the key does not exist for the extension, it must be created
New-Item HKCU:\SoftwareClasses\ -Name .ps1
# System-wide setting, requires administrator rights
Set-ItemProperty Registry::HKEY_CLASSES_ROOT\.twig -Name PerceivedType -Value text
# If the key does not exist for the extension, it must be created
New-Item Registry::HKEY_CLASSES_ROOT\ -Name .twig

Video : Viewing other types of file containing simple text in Windows

Play

Related links