{"id":11445,"date":"2016-03-07T08:00:20","date_gmt":"2016-03-07T16:00:20","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=11445"},"modified":"2016-03-15T12:36:40","modified_gmt":"2016-03-15T19:36:40","slug":"powershell-studio-2016-whats-new-part-3","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2016\/03\/07\/powershell-studio-2016-whats-new-part-3\/","title":{"rendered":"PowerShell Studio 2016: What&rsquo;s New? (Part 3)"},"content":{"rendered":"<p>PowerShell Studio 2016 is released! We&#8217;ve written a series of blog posts to introduce you to the newest features. In this blog, Part 3, we will look at some of the new editor features of PowerShell Studio 2016.<\/p>\n<p>But, there&#8217;s more:<\/p>\n<ul>\n<li>In <a href=\"https:\/\/www.sapien.com\/blog\/2016\/02\/29\/powershell-studio-2016-released-whats-new-part-1\/\">Part 1<\/a>, we review the new UI features, including our new dark themes.<\/li>\n<li> In <a href=\"https:\/\/www.sapien.com\/blog\/2016\/03\/02\/powershell-studio-2016-whats-new-part-2\/\" target=\"_new\">Part 2<\/a>, we introduce our new debugging features, including variable and function breakpoints and improvements to the Variables pane.<\/li>\n<li>In <a href=\"https:\/\/www.sapien.com\/blog\/2016\/03\/15\/powershell-studio-2016-custom-primalsense\/\" target=\"_blank\">Part 4<\/a>, we show the new customizable PrimalSense in PowerShell Studio 2016.\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Import Functions<\/strong><\/h3>\n<p>PowerShell Studio already allowed you to convert functions into a new module (File-&gt;New-&gt;New Module from Functions). Now, with PowerShell Studio 2016, you can import functions into your existing scripts or modules.<\/p>\n<p>You can find the <strong>Import Functions<\/strong> feature in the Edit group in the Home tab of the ribbon:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-21.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-17.png\" alt=\"image\" width=\"244\" height=\"92\" border=\"0\" \/><\/a><\/p>\n<p>Or in the Functions panel:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-22.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-18.png\" alt=\"image\" width=\"244\" height=\"207\" border=\"0\" \/><\/a><\/p>\n<p>You&#8217;ll be prompted to select the files that contain the functions. You can select and remove files at any time. All functions in the files will be listed in the Import Functions dialog box.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-23.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-19.png\" alt=\"image\" width=\"244\" height=\"146\" border=\"0\" \/><\/a><\/p>\n<p>To insert the checked functions in the script, press the <i>Import<\/i> button.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-24.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-20.png\" alt=\"image\" width=\"244\" height=\"146\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Code Folding Options<\/strong><\/h3>\n<p>PowerShell Studio supported collapsible code in the form of regions, multiline comments, and script blocks. PowerShell Studio 2016 lets you control which regions collapse and expand when you use the collapse \/ expand commands.<\/p>\n<p>To select collapsible regions, in the Edit group on the ribbon, click <b>Regions<\/b>, and then click <b>Include<\/b>.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-25.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-21.png\" alt=\"image\" width=\"244\" height=\"116\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>New Code Formatting Options<\/strong><\/h3>\n<p>We added two new formatting options.<\/p>\n<p><strong>Automatically expand aliases<\/strong><\/p>\n<p>When enabled, this option expands command and parameter aliases when formatting your script.<\/p>\n<p>Before:<br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-26.png\" alt=\"image\" width=\"235\" height=\"37\" border=\"0\" \/><\/p>\n<p>After:<br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-27.png\" alt=\"image\" width=\"302\" height=\"40\" border=\"0\" \/><\/p>\n<p><strong>Convert curly quotes to straight quotes<\/strong><\/p>\n<p>When enabled, this option automatically replaces curly quotes (blog quotes) with straight quotes when formatting your script.<\/p>\n<p>Before:<br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-28.png\" alt=\"image\" width=\"219\" height=\"35\" border=\"0\" \/><\/p>\n<p>After:<br \/>\n<img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-29.png\" alt=\"image\" width=\"225\" height=\"40\" border=\"0\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>TODO \/ DONE Tasks comments<\/strong><\/h3>\n<p>When creating event handlers for PowerShell GUI applications, you might have noticed that a TODO: comment is included:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-30.png\" alt=\"image\" width=\"353\" height=\"88\" border=\"0\" \/><\/p>\n<p>These comments are meant to be reminders that you have to place your custom script in the event script block.<\/p>\n<p>To help you find these uncompleted tasks, PowerShell Studio will display the TODO: comments in the Navigation menu that is located in the upper right corner of the Script tab:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-31.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-22.png\" alt=\"image\" width=\"244\" height=\"164\" border=\"0\" \/><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 5px 0px 0px; display: inline; border-width: 0px;\" title=\"Tip\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/Tip.png\" alt=\"Tip\" width=\"32\" height=\"32\" align=\"left\" border=\"0\" \/><\/p>\n<p>DONE: comments will appear in the Navigation menu as you complete the tasks.<\/p>\n<p>To quickly jump directly to these task comments in your script, select them from the Navigation menu.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>New Document Tab Commands<\/strong><\/h3>\n<p>PowerShell Studio 2016 adds a few new commands to the context menu that appears when you right click the tab for a file:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/SNAGHTML19dce1f.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SNAGHTML19dce1f\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/SNAGHTML19dce1f_thumb.png\" alt=\"SNAGHTML19dce1f\" width=\"304\" height=\"152\" border=\"0\" \/><\/a><\/p>\n<p><strong>Copy File Name<\/strong><\/p>\n<p>Copies the file name to the clipboard.<\/p>\n<p><strong>Copy Folder Path<\/strong><\/p>\n<p>Copies the file folder path to the clipboard.<\/p>\n<p><strong>Reload Document<\/strong><\/p>\n<p>Reloads the document, undoing any unsaved changes.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Edit Options<\/strong><\/h3>\n<p>For your convenience, we moved all PrimalSense-related options to their own Options page:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-32.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-23.png\" alt=\"image\" width=\"244\" height=\"192\" border=\"0\" \/><\/a><\/p>\n<p>Separating these options declutters the Editor page and makes it easier for you to find the settings you are looking for.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image-33.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-24.png\" alt=\"image\" width=\"244\" height=\"192\" border=\"0\" \/><\/a><\/p>\n<p>Now, all the auto-insert options are grouped in one convenient location.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>PowerShell V2 Compatibility\u00a0 <\/strong><\/h3>\n<h3><\/h3>\n<p>In build v5.2.116, we introduced a new option (Options-&gt;Designer): <em>Enable PowerShell V2 assembly compatibility<\/em>.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/03\/image.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/03\/image_thumb.png\" alt=\"image\" width=\"244\" height=\"183\" border=\"0\" \/><\/a><\/p>\n<p>When this option is enabled, PowerShell Studio will use .NET 2.0 assembly references when generating GUI scripts and will warn you if any assembly does not support the .NET 2.0 Runtime.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 5px 0px; display: inline; border: 0px;\" title=\"Tip\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/03\/Tip.png\" alt=\"Tip\" width=\"32\" height=\"32\" align=\"left\" border=\"0\" \/><br \/>\nYou can access the file\u2019s assemblies using the Ribbon-&gt;Home-&gt;Edit-&gt;Assemblies:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border: 0px;\" title=\"image\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/03\/image-1.png\" alt=\"image\" width=\"239\" height=\"151\" border=\"0\" \/><\/p>\n<p>If the option is unchecked, it will use the 4.0 .NET or later assemblies and place a <em><span style=\"color: #008000;\">#requires \u2013Version<\/span><\/em> comment at the top of the generated script.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Next we will look at PowerShell Studio 2016\u2019s new Custom PrimalSense feature.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell Studio 2016 is released! We&#8217;ve written a series of blog posts to introduce you to the newest features. In this blog, Part 3, we will look at some of the new editor features of PowerShell Studio 2016. But, there&#8217;s more: In Part 1, we review the new UI features, including our new dark themes. [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[703,21,632,25],"tags":[28,1068,645,141],"class_list":["post-11445","post","type-post","status-publish","format-standard","hentry","category-powershell-studio","category-software-news","category-whats-new-software-news","category-windows-powershell","tag-powershell","tag-powershell-studio-2016","tag-service-build-2","tag-whats-new"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/11445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=11445"}],"version-history":[{"count":11,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/11445\/revisions"}],"predecessor-version":[{"id":11659,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/11445\/revisions\/11659"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=11445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=11445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=11445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}