Viewing other types of file containing simple text in Windows
1 min read · Updated 18 December 2021
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 userSet-ItemProperty HKCU:\Software\Classes\.ps1 -Name PerceivedType -Value text
# If the key does not exist for the extension, it must be createdNew-Item HKCU:\SoftwareClasses\ -Name .ps1
# System-wide setting, requires administrator rightsSet-ItemProperty Registry::HKEY_CLASSES_ROOT\.twig -Name PerceivedType -Value text
# If the key does not exist for the extension, it must be createdNew-Item Registry::HKEY_CLASSES_ROOT\ -Name .twigVideo : Viewing other types of file containing simple text in Windows
Related links
- PowerShell
PowerShell - Hyper-V - Managing virtual machine configuration versions
How to update the configuration version of a virtual machine so that it can use the new features available on your new Hyper-V
2 min read
- Tips
How to customise the Send To menu in Windows Explorer
Customise the Send To menu in Windows Explorer
1 min read
- Tips
Launch software on login with a simple shortcut
Run a program at sign-in from a shortcut in the startup folders, and remove the startup delay in the registry with PowerShell.
2 min read
- Tips
How to add and manage shortcuts in the Start menu in Windows 10 and 11
Add and manage shortcuts in the Start menu in Windows 10 and 11
1 min read
- Tips
How to add shortcuts on the desktop of different users under Windows 10 and 11
Paths of the common desktop, the current user's desktop and the Default profile to add a shortcut on the desktop of different users.
1 min read
- Tips
How to create shortcuts in Windows 10 and Windows 11
Having looked at shortcuts and their parameters, here are some different ways of creating shortcuts
1 min read