Enabling Preview of PowerShell Files in File Explorer

When you view PowerShell scripts in Windows Explorer and have the preview pane open, by default you don’t get a code preview for your script files. The preview pane remains blank.

To enable the preview, use the function below:

To enable preview of PowerShell files in File Explorer, run the following command:

If you like, you can also set a font family and size for the preview.

Note: this setting is shared with the Notepad:

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon 😉

About Lex van der Horst 201 Articles

Be the first to comment

Leave a Reply