{"id":15529,"date":"2018-08-14T08:00:21","date_gmt":"2018-08-14T15:00:21","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=15529"},"modified":"2018-08-14T07:53:36","modified_gmt":"2018-08-14T14:53:36","slug":"powershell-studio-2018-service-release-v5-5-154-and-pscore-support","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2018\/08\/14\/powershell-studio-2018-service-release-v5-5-154-and-pscore-support\/","title":{"rendered":"PowerShell Studio 2018: Service Release v5.5.154 and PSCore Support"},"content":{"rendered":"<p>We released a new service build of PowerShell Studio 2018 (v5.5.154). This service build is included as part of the regular update cycle for our subscribers.<\/p>\n<p>&nbsp;<\/p>\n<h2>New Features<\/h2>\n<p>This service release adds PowerShell Core (V6) support and introduces several new project features.<\/p>\n<p>&nbsp;<\/p>\n<h3>PowerShell Core (V6) Support<\/h3>\n<p>We are happy to announce added support for PowerShell Core (V6). Now you can select PowerShell Core from the platform selection in the ribbon (Home &gt; Platform):<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Platform-PowerShell-Core.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Platform - PowerShell Core\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Platform-PowerShell-Core_thumb.png\" alt=\"Platform - PowerShell Core\" width=\"644\" height=\"370\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Note: PowerShell Studio automatically detects preview and release versions of PowerShell Core and displays them in the platform list.<\/p>\n<p>&nbsp;<\/p>\n<p>The new platform settings allow you to run PowerShell Core scripts directly from PowerShell Studio:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Run-PSCore-Scripts.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Run PSCore Scripts\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Run-PSCore-Scripts_thumb.png\" alt=\"Run PSCore Scripts\" width=\"644\" height=\"263\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #800000;\">Important: Debugging and caching for PowerShell Core is not available at this time. For syntax coloring, PowerShell Studio will use the PowerShell V5 cmdlet cache as a fall back.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h4>PowerShell Core Consoles<\/h4>\n<p>In regards to the embedded consoles, if you install a new version of PowerShell Core, you will need to reset your consoles to see the new version in the console panel:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Options-Console-Reset.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Options - Console - Reset\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Options-Console-Reset_thumb.png\" alt=\"Options - Console - Reset\" width=\"577\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If you don\u2019t want to reset any custom settings, then you will have to manually update the path to the PowerShell Core executable.<\/p>\n<p>&nbsp;<\/p>\n<h3>Project Features<\/h3>\n<p>This release introduces several new project specific features.<\/p>\n<p>&nbsp;<\/p>\n<h4>Module Projects \u2013 Auto Export Functions and PS1XML files<\/h4>\n<p>The new auto export features for module projects makes managing your manifest exports easier than ever.<\/p>\n<p>&nbsp;<\/p>\n<h5>New Module Project Properties:<\/h5>\n<table class=\"nicetable\" border=\"0\" width=\"600\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"200\"><strong>Property<\/strong><\/td>\n<td valign=\"top\" width=\"400\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"200\">Auto Export Functions<\/td>\n<td valign=\"top\" width=\"400\">Handles function exports automatically.<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"200\">Auto Export PS1XML Files<\/td>\n<td valign=\"top\" width=\"400\">Handles ps1xml exports automatically.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Module-Project-Auto-Export-Properties.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Module Project - Auto Export Properties\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Module-Project-Auto-Export-Properties_thumb.png\" alt=\"Module Project - Auto Export Properties\" width=\"430\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h5>Auto Export Functions<\/h5>\n<p>If set to <em>True<\/em>, on build, the module project will update the manifest\u2019s <strong><em>FunctionsToExport<\/em><\/strong> field with a list of exported functions. To determine which functions are exported, the module project files have a new <strong>Export Functions<\/strong> property that determines if functions defined in the file are exported:<\/p>\n<p>&nbsp;<\/p>\n<h5>Project File &#8211; Export Functions Property<\/h5>\n<p>If a project file\u2019s <strong>Export Functions<\/strong> property is set to <em>True<\/em>, PowerShell Studio will use the functions defined in the file to update the manifest\u2019s <strong><em>FunctionsToExport<\/em><\/strong> value.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-File-Export-Functions.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Project File - Export Functions\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-File-Export-Functions_thumb.png\" alt=\"Project File - Export Functions\" width=\"430\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This property allows you to organize your functions into files that are public (exported) and private (not exported). Once configured, you do not need to manually update the manifest when you add, remove, or renamed a function.<\/p>\n<p>&nbsp;<\/p>\n<h5>Auto Export PS1XML Files<\/h5>\n<p>If set to <em>True<\/em>, on build, the module project will update the manifest\u2019s <em><strong>TypesToProcess<\/strong><\/em> and <strong><em>FormatsToProcess<\/em><\/strong> fields with the list of ps1xml files contained within the project.<\/p>\n<p>Depending on the file\u2019s name, PowerShell Studio will determine which field to use:<\/p>\n<table class=\"nicetable\" border=\"0\" width=\"600\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"207\"><strong>Filename<\/strong><\/td>\n<td valign=\"top\" width=\"393\"><strong>Manifest Field<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"207\">*.Type.ps1xml<\/td>\n<td valign=\"top\" width=\"393\">TypesToProcess<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"207\">*.Format.ps1xml<\/td>\n<td valign=\"top\" width=\"393\">FormatsToProcess<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note: The ps1xml file must be part of the project and its <strong>Build<\/strong> property must be set to <em>Content<\/em> in order for it to be included in the manifest.<\/p>\n<p>&nbsp;<\/p>\n<p>When you <em>Build<\/em> the module project the manifest is now updated automatically, thus alleviating the previous requirement to manually update the manifest.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Module-Build-Auto-Export.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Module - Build - Auto Export\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Module-Build-Auto-Export_thumb.png\" alt=\"Module - Build - Auto Export\" width=\"644\" height=\"332\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Build Order<\/h4>\n<p>The new project file <strong>Build Order<\/strong> property allows you to determine the order in which project files are merged into the final project script. This setting only applies to project files with the <strong>Build<\/strong> property set to <em>Include<\/em>.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-File-Build-Order.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Project File - Build Order\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-File-Build-Order_thumb.png\" alt=\"Project File - Build Order\" width=\"430\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>The build order can be important when the content of one project file is dependent on the content of another file.\u00a0 For example, when dealing with class inheritance in PowerShell, you must make sure the base class is defined before declaring any classes that inherit from that base class. By setting the build order of the individual class files, you can ensure that the final script includes the base class definition before the inherited class definition.<\/p>\n<p>Another use case would be when functions or global variables are defined within a global file (<b>Shared<\/b> = <i>True<\/i>). To ensure those declarations are defined before invoking, the build order index should be set to a value lower than that of the dependent project files.<\/p>\n<p>&nbsp;<\/p>\n<p>Set the build order of project files by modifying the zero-based index of each project file. An index of <strong>0<\/strong> ensures that the file will be the first one merged into the generated script.<\/p>\n<p>&nbsp;<\/p>\n<p>There are some exceptions to the build order:<\/p>\n<p>&#8211; In a module project, the primary psm1 file\u2019s content is included at the end of the generated script regardless of its <strong>Build Order<\/strong> property value.<\/p>\n<p>&#8211; Collection projects only support project files with <strong>Build<\/strong> = <em>Content<\/em>, therefore the<strong> Build Order <\/strong>property is not applicable.<\/p>\n<p>&nbsp;<\/p>\n<h4>Project Sync on Activate<\/h4>\n<p>We included a new option, <em>Sync files when the application is activated<\/em>, that allows you to trigger project file synchronization when the application regains focus (activated).<\/p>\n<p>Options &gt; General &gt; Project:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Sync-Files-on-Activate.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Sync Files on Activate\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Sync-Files-on-Activate_thumb.png\" alt=\"Sync Files on Activate\" width=\"568\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>Note: In order for this feature to work, you must have a project opened with file synchronization enabled (<strong>Synchronized<\/strong> = <em>True<\/em>):<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-Synchronized.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Project - Synchronized\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Project-Synchronized_thumb.png\" alt=\"Project - Synchronized\" width=\"430\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>This option ensures that the application can detect changes when you are making modifications to the project\u2019s folder structure outside of PowerShell Studio.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Files-Synchronized.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Files Synchronized\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Files-Synchronized_thumb.png\" alt=\"Files Synchronized\" width=\"644\" height=\"148\" border=\"0\" \/><\/a><\/p>\n<p>Note: We updated the synchronization messages to use <strong>+<\/strong> and <strong>\u2013<\/strong> for adding and removing file messages.<\/p>\n<p>&nbsp;<\/p>\n<h4>Windows Service Project Template<\/h4>\n<p>This service release includes the new <em>Windows Service Project<\/em> template which allows you to create a Windows service script using a project:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Windows-Service-Project-Template.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Windows Service Project Template\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Windows-Service-Project-Template_thumb.png\" alt=\"Windows Service Project Template\" width=\"644\" height=\"419\" border=\"0\" \/><\/a><\/p>\n<p>Some benefits of using a project verses a single file script are the ability to manage additional content, and also to organize your script into individual script files to make your code more manageable.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Windows-Service-Project.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Windows Service Project\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Windows-Service-Project_thumb.png\" alt=\"Windows Service Project\" width=\"644\" height=\"369\" border=\"0\" \/><\/a><\/p>\n<p>The <i>Windows Service Project <\/i>utilizes the same predefined functions used by the single file Windows Service Script template.<\/p>\n<p>&nbsp;<\/p>\n<h3>PowerShell Browser \u2013 Distinguishing Command Types<\/h3>\n<p>We updated the PowerShell Brower in the Object Browser Panel, so that the icons visually distinguish functions, workflows, and cmdlets:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Object-Browser-Command-Icons.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"Object Browser - Command Icons\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/07\/Object-Browser-Command-Icons_thumb.png\" alt=\"Object Browser - Command Icons\" width=\"269\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This change helps surface the true command types of the module. In addition, the PowerShell Browser now retains your selection when switching between PowerShell platforms.<\/p>\n<p>&nbsp;<\/p>\n<h3>PS1XML Type Caching<\/h3>\n<p>PowerShell Studio now caches ps1xml type files, which allows PowerShell Studio\u2019s PrimalSense to display extended type properties and methods without executing the script.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/08\/PrimalSense-Added-PowerShell-Properties.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"PrimalSense Added PowerShell Properties\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/08\/PrimalSense-Added-PowerShell-Properties_thumb.png\" alt=\"PrimalSense Added PowerShell Properties\" width=\"644\" height=\"247\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Feedback<\/h2>\n<p>Please continue providing your feedback. Many of the new features included in the service builds are suggestions from users like you. Submit your suggestions or feature requests on the <a href=\"https:\/\/www.sapien.com\/forums\/viewforum.php?f=9\">Wish List and Feature Requests<\/a> forum or the new <a href=\"https:\/\/www.sapien.com\/requests\">Feature Requests<\/a> page.<\/p>\n<p>You can view the complete service build log <a href=\"https:\/\/www.sapien.com\/software\/version_history\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We released a new service build of PowerShell Studio 2018 (v5.5.154). This service build is included as part of the regular update cycle for our subscribers. &nbsp; New Features This service release adds PowerShell Core (V6) support and introduces several new project features. &nbsp; PowerShell Core (V6) Support We are happy to announce added support [&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],"tags":[28,1215,1244,645,155,141],"class_list":["post-15529","post","type-post","status-publish","format-standard","hentry","category-powershell-studio","category-software-news","category-whats-new-software-news","tag-powershell","tag-powershell-core","tag-powershell-studio-2018","tag-service-build-2","tag-service-release","tag-whats-new"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/15529","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=15529"}],"version-history":[{"count":8,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/15529\/revisions"}],"predecessor-version":[{"id":15816,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/15529\/revisions\/15816"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=15529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=15529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=15529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}