Is there a PowerShell script previewer for file explorer in windows with syntax highlighting?

Copper Contributor

The subject says it all really, I do have a previewer but it is plain text and I would like to preview with syntax highlighting.

5 Replies
Never saw a preview in the Windows Explorer, but Notepad++ is pretty light-weight when opening files and has syntax highlighting

@Experimentalist 

 

Haven't tested it, but the PowerToys File Explorer add-on seems to have syntax highlighting: https://learn.microsoft.com/en-gb/windows/powertoys/file-explorer

Just tested it and yes, it does work :) Have PowerToys installed, but never used the File Explorer preview. Just enable it and use ALT-P in File Explorer and select a PowerShell file... Nicely formatted too if you enabled the File Explorer Add-ons/Source Code (Monaco/Try for format the source preview option
Happy to hear it works! Though considering the security risks of preview in explorer (the last one being Follina) I would personally never enable it or use it.

@raindropsdev Personally I don't use previews in Explorer because it slows things done, but yes... Security risk too. But that's up to the @Experimentalist who started this topic ;)