Running PowerShell scripts from Visual Studio
In the Project properties, on the Debug tab:
In “Start external program”:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
In the “Command line arguments”:
-noexit -command "&{ import-module .\Module\ModuleName -Verbose}; "