Powershell Best Practice #18: Don’t use Notepad as a script editor

By | August 4, 2015

Best Practice: It is recommended to avoid to use Notepad as a script editor.

Explanation:

I saw many times people working with scripts using Notepad/Notepad++  and then running the script in a PowerShell console.
You should not do that as they are basic and poor editor, features are very limited and not appropriated.

With Notepad you cannot have:

  1. Syntax highlighting (to detect syntax errors faster)
  2. Collapse all (Control + M : to go in a specific part of your script faster)
  3. Clean indentation (to have a cleaner and uniform code)
  4. Run selection (F8: run a specific block or lines in your script)
  5. Set breakpoints (F9: temporarily suspend execution of your script at a specific point)
  6. Layout windows (Control + F1, F2 or F3 and full screen)
  7. Number of lines displayed

Instead of that, I recommended to use:


previous-buttonnext-button

One thought on “Powershell Best Practice #18: Don’t use Notepad as a script editor

  1. Pingback: Powershell Best Practice #17: Use the same parameter name than the native one | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *