RSS

Tag Archives: ISE

PowerShell – easily posting scripts to a website while maintaining syntax highlighting by copying as HTML

PowerShell – easily posting scripts to a website while maintaining syntax highlighting by copying as HTML

 

 

 

When sharing PowerShell scripts on the Internet there are a couple of options:

  1. Simply post it as plain text, which means syntax highlighting will not be included.
  2. Use available syntax highlighting for the platform you use. Sample platforms include:
    Microsoft ScriptCenter and a syntax highlighting example from a script of mine: https://gallery.technet.microsoft.com/scriptcenter/Determine-possible-values-eaf48782
    Wordpress : https://en.support.wordpress.com/code/posting-source-code/
  3. Copy code to HTML including syntax highlighting.

Option 2 and 3 are preferred, especially sharing to Microsoft ScriptCenter because others can then more easily find and use your scripts and maybe even improve them or give you tips on how to make better script.

Option 2 however requires that you have to accept whatever the platform provider has chosen with regards to syntax highlighting, which might differ between platforms. With option 3 you have more freedom with regards to the output and you are in control. Basically it means copying code to HTML including syntax highlighting. The solution I use mostly for this is the Windows PowerShell V3 ISE: Copy As HTML Add-On which adds a simple “Copy As HTML” option in the menu and which can also be used using the shortcut CTRL+SHIFT+C.

I don’t have experience with it, but you could take a look at the script that Lee Holmes from the PowerShell team provided: http://www.leeholmes.com/blog/2009/02/03/more-powershell-syntax-highlighting/
In the comments someone apparently also implemented it as a PowerGUI add-on.

For more PowerShell ISE Add-ons be sure to visit: http://social.technet.microsoft.com/wiki/contents/articles/2969.windows-powershell-ise-add-on-tools.aspx

Advertisement
 
Leave a comment

Posted by on March 14, 2016 in ICT, Microsoft, Powershell

 

Tags: , , , , , , , , , , ,

Summary of 2nd Dutch PowerShell User Group – DuPSUG meeting with additional resources

Future events

Before starting with my summary of 2nd DuPSUG meeting, I want to inform you about some future events first:

  • Dutch PowerShell User Group Meetings
    • To keep track of news, use the links  to LinkedIn, Facebook, Twitter and the RSS feed on the DUPSUG website.
    • In the future, the plan is to meet every June and November.
    • The next meeting will probably be at November 7th at VX Company.
    • The idea is that community members will also present their own experiences, use cases, scripts, tools, methods. If you want to do so, please contact the DUPSUG group.
      • Remko Weijnen | Blog | Twitter | LinkedIn might be one of the people presenting at a future DUPSUG meeting.
    • Jeff Wouters might be able to arrange one or more copies of the PowerShell Deep Dives book from Manning since he’s contributing to it. The book isn’t complete and released yet, but Manning has an Early Access Program which means that you will get access to the completed chapters now and will get the full version when it’s done. Until June 13 there’s even a promotion to get a 40%-50% discount and it also applies to other great PowerShell books.
  • Inter Access Microsoft Summer Summit (Hilversum, July 2nd 2013 17:30-22:00 CET)

This event

Last Thursday I attended the second Dutch Powershell User Group meeting in Hilversum hosted at Inter Access and sponsored by Sapien Technologies Inc.

Just like I mentioned in the summary of the first meeting there were manu interesting sessions that provided me with more insight and inspired me for practical uses. It was also great to discuss current developments with other knowledgeable and passionate people. The main differences with the previous meeting was that:

  • This meeting was completely in Dutch, while the previous one was completely in English. As such, the workshop descriptions were also in Dutch and you needed to bring your own laptop.
  • The format of this meeting was more of a workshop, while the previous one was mainly presentations.

Thanks go out to all attendees, especially those presenting, organizing and sponsoring the event. Special thanks to Daniel Bot for helping me fix a (stupid mistake in a) script I was working on 🙂

Goodies and giveaways

Workshops / presentations

And now on with the really interesting stuff, the sessions/workshops. Below are the sessions with some info about the speakers and their sessions. I also added notes I took and other information I looked up afterwards. If you come across any errors or have comments, please leave a reply so I can fix it.

Read the rest of this entry »

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Summary of 1st Dutch PowerShell User Group (DuPSUG) meeting

General

Last Friday I attended the first Dutch Powershell User Group meeting in Eindhoven at Master IT Training and it was great. There were a lot of knowledgeable and passionate people and the interactive sessions were great as well. Thanks go out to all attendees, but especially to the ones presenting and organizing the event.

The fact that we were asked to leave the building (because it was getting pretty late and they wanted to lock up), also stresses the passion of all attendees because. If this wasn’t the case we probably would’ve stayed a lot longer.

Be sure to check out the Dutch PowerShell User Group (DuPSUG) website and Twitter on a regular basis for articles and future events. Ed Wilson also wrote a post of the meeting on the “Hey, Scripting Guy! Blog”.

Photos

Ed Wilson "The Scripting Guy" At Dutch PowerShell User Group DuPSUG
Original photo on flickr

Sessions

Below are the sessions with some info about the speakers and their sessions. I also added notes I took and other information I looked up afterwards. If you come across any errors or have comments, please leave a reply so I can fix it.

Read the rest of this entry »

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

 
%d bloggers like this: