0

When I'm editing a PowerShell script module (.psm1) in the ISE, and I press F5, nothing happens. It doesn't even save the script module to disk, like it does if I'm editing a script (.ps1) file.

What I'd expect to have happen is for it to save the file (if dirty) and then execute a Import-Module -Force command for the module, and perhaps running some tests I've got defined for it.

I know there the ISE is extensible, is there a way to enhance the ISE to get this behavior for F5?

Burt_Harris
  • 6,415
  • 2
  • 29
  • 64

1 Answers1

1

"PowerShell modules enable you to partition, organize, and abstract your Windows PowerShell code into self-contained, reusable units." - Writing a Windows PowerShell Module

In order for you to run the code in your module, you need to import it through a regular PowerShell script, see Windows PowerShell Module Concepts for more information

ShaneC
  • 2,237
  • 2
  • 32
  • 53