ISE V3 - Need to be able to Comment a series of lines in a block of code. - by MaxTrinidad

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 711231 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 12/3/2011 8:13:52 AM
Access Restriction Public


I can't comment a block of code.

Just a suggestion that may help all newbies in using PowerShell ISE V3 to be able to highlight a block of code (this code be a function with 50 lines) to be commented out. This could be added in the ribbon menu and available when doing a right-click to the highlighted code.

PS... in the question "How often does this happen?", there's no option for not available.
Sign in to post a comment.
Posted by MaxTrinidad on 9/16/2015 at 11:27 AM
And, Microsoft closed without a resolution. It's been 4 year's since I posted this issue and ended up without been resolved. They are letting the community to come up with add-on solutions to correct missing features. This is why I don't use ISE.

This is a VALID Issue and so sad they didn't fix it in 4 years. I think it's time to move the ISE code to Open Source.
Posted by Mike-EEE on 9/16/2015 at 9:13 AM
This issue really isn't "fixed." The vulcan-keyboard alt-shift dance is hardly elegant. Visual Studio has this functionality built-in and it's a shame that yet another MSFT group goes ahead and reinvents another IDE wheel. Visual Studio even offers a lightweight Shell you could have leveraged. Way to show attention detail and a passion for your product, fellas. Collect a paycheck, much? You would do well in the SQL Server group.
Posted by JoelDB on 9/9/2015 at 12:57 PM
I agree with Dominik. Wrapping (and unwrapping) a section of code in a block comment <# code #> is something that would be very useful.
Posted by Dominik Trojnar on 6/25/2015 at 1:45 AM
I would not treat Microsoft's comment as a resolution - it comments every line with "#" and what would be nice is to have <# #> block comment.
Posted by on 9/5/2014 at 9:22 AM
Play online <a href=> free flash games</a>
Posted by Free game 3 on 8/13/2014 at 2:05 PM
It worked.
Posted by sba on 7/24/2014 at 8:05 AM
The Alt+Shift+Up/Down, # trick indeed works (where is it documented?) but there's no easy-and-fast "uncomment" equivalent AFAIK
Posted by Microsoft on 5/1/2014 at 8:40 PM
We added this in v3. Try this:
Put cursor on Column 1 in a script
Press Alt + Shift + Up/Down Arrow Keys to block select lines to comment
Press # to add comment
Posted by deadlydog on 6/20/2013 at 10:11 AM
I agree that this should be provided out of the box. In the meantime I show how you can get this functionality within a couple minutes by using the add-on I made on my blog at
Posted by Joel 'Jaykul' Bennett on 1/25/2012 at 6:39 PM
Don't forget to UNCOMMENT a block too.