Powershell -GET POWERSHELL ISE TO RUN SCRIPTS WITH -VERBOSE FLAG

GET POWERSHELL ISE TO RUN SCRIPTS WITH -VERBOSE FLAG


Open up your Microsoft.PowerShellISE_profile.ps1 file and add the following lines:

$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add('Run with -Verbose', { Invoke-Expression -Command ". '$($psISE.CurrentFile.FullPath)' -Verbose" }, 'Ctrl+F5') | Out-Null
$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add('Run with -Debug',   { Invoke-Expression -Command ". '$($psISE.CurrentFile.FullPath)' -Debug" }, 'Ctrl+F6') | Out-Null


 restart ISE you should see the options under the Add-Ons menu.

Spiceworks Link
https://community.spiceworks.com/scripts/show/3707-get-powershell-ise-to-run-scripts-with-verbose-flag