• Login
Community
  • Login

How to enable syntax highlighting for *.ps1 Powershell script files?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 4 Posters 221 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Claudia Svenson
    last edited by Apr 16, 2025, 6:11 AM

    How can I enable syntax highlighting for *.ps1 Powershell script files?

    T P 2 Replies Last reply Apr 16, 2025, 6:49 AM Reply Quote 0
    • T
      Terry R @Claudia Svenson
      last edited by Apr 16, 2025, 6:49 AM

      @Claudia-Svenson

      As you are asking the question it suggests you aren’t currently seeing that work for you.

      The online manual is a good starting point to read how it works, here .

      Are they actual files (saved as something.ps1)? If you only have a tab filled with the code, but net yet saved, then save it with the ps1 extension.

      Terry

      A 1 Reply Last reply Apr 16, 2025, 10:26 AM Reply Quote 0
      • A
        Alan Kilborn @Terry R
        last edited by Apr 16, 2025, 10:26 AM

        @Terry-R said in How to enable syntax highlighting for *.ps1 Powershell script files?:

        then save it with the ps1 extension.

        Or. use the Language menu to select PowerShell.

        1 Reply Last reply Reply Quote 0
        • P
          PeterJones @Claudia Svenson
          last edited by Apr 16, 2025, 1:26 PM

          @Claudia-Svenson said in How to enable syntax highlighting for *.ps1 Powershell script files?:

          How can I enable syntax highlighting for *.ps1 Powershell script files?

          Which Theme are you using? It’s possible that your theme file is out-of-date, or that you are a using a theme that has never had the powershell highlighting added, which would prevent Notepad++ from syntax highlighting, even when it is named blah.ps1.

          Please see my post here explaining why; and the User Manual’s Themes: Keeping Stylers/Themes Up-to-date entry for more.

          1 Reply Last reply Reply Quote 4
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors