{"id":12633,"date":"2016-08-19T06:00:57","date_gmt":"2016-08-19T13:00:57","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=12633"},"modified":"2016-08-19T09:04:30","modified_gmt":"2016-08-19T16:04:30","slug":"setting-up-powershell-on-your-mac","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2016\/08\/19\/setting-up-powershell-on-your-mac\/","title":{"rendered":"Setting up PowerShell on your Mac (Update!)"},"content":{"rendered":"<p>Now that PowerShell is available on the <a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/powershell-is-open-sourced-and-is-available-on-linux\/\">Mac<\/a>, we thought it would be useful to show how easy it is to setup\u00a0a Mac terminal session that automatically opens into PowerShell. Figure 1\u00a0shows\u00a0what we mean.<\/p>\n<div id=\"attachment_12634\" style=\"width: 1140px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12634\" class=\"size-full wp-image-12634\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM.png\" alt=\"Figure 1 - PowerShell Terminal Session\" width=\"1130\" height=\"723\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM.png 1130w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM-300x192.png 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM-768x491.png 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.11.26-PM-1024x655.png 1024w\" sizes=\"auto, (max-width: 1130px) 100vw, 1130px\" \/><\/a><p id=\"caption-attachment-12634\" class=\"wp-caption-text\">Figure 1 &#8211; PowerShell Terminal Session<\/p><\/div>\n<p>First you need to download the PowerShell macOS package from <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\">here<\/a> (look for the Get PowerShell section in the README.md) and install it using the directions found <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\/blob\/master\/docs\/installation\/linux.md#os-x-1011\">here<\/a>\u00a0. Once PowerShell is installed and running on your system, follow the instructions below to set up your PowerShell terminal<\/p>\n<p>Here are the steps to follow:<\/p>\n<ol>\n<li>Open Terminal on the Mac in whatever fashion you usually use<\/li>\n<li>In the Terminal menu, select Preferences&#8230;<\/li>\n<li>Select Profiles in the Preferences window toolbar<\/li>\n<li>Select a Profile in the left list<\/li>\n<li>Select the Gear icon at the bottom of the list<\/li>\n<li>Select Duplicate Profile from the drop down<\/li>\n<li>Rename the new profile to PowerShell<\/li>\n<li>In the Text tab on the right do the following:\n<div id=\"attachment_12635\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.27.20-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12635\" class=\"size-full wp-image-12635\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.27.20-PM.png\" alt=\"Figure 2 - Text Preferences\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.27.20-PM.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.27.20-PM-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12635\" class=\"wp-caption-text\">Figure 2 &#8211; Text Preferences<\/p><\/div>\n<ol>\n<li>Click on Color &amp; Effects and select a Dark Blue color from the color wheel<\/li>\n<li>Change the font to Menlo Regular 24 (or whatever works for you)<\/li>\n<li>Check all the attributes in the Text section<\/li>\n<li>Click on _Underline in the cursor section<\/li>\n<\/ol>\n<\/li>\n<li>Click the Window Tab\n<div id=\"attachment_12636\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.28.52-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12636\" class=\"size-full wp-image-12636\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.28.52-PM.png\" alt=\"Figure 3 - Window preferences\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.28.52-PM.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.28.52-PM-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12636\" class=\"wp-caption-text\">Figure 3 &#8211; Window preferences<\/p><\/div>\n<ol>\n<li>Set the title to whatever you want. We like Windows PowerShell<\/li>\n<li>Check or uncheck the other items you want or don&#8217;t want to see in the title bar<\/li>\n<\/ol>\n<\/li>\n<li>Select the Tab tab\n<div id=\"attachment_12637\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.29.31-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12637\" class=\"size-full wp-image-12637\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.29.31-PM.png\" alt=\"Figure 3 - Tab preferences\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.29.31-PM.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.29.31-PM-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12637\" class=\"wp-caption-text\">Figure 3 &#8211; Tab preferences<\/p><\/div>\n<ol>\n<li>check the options you want to see when you have PowerShell tabs<\/li>\n<\/ol>\n<\/li>\n<li>Click the Shell tab\n<div id=\"attachment_12638\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.30.06-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12638\" class=\"size-full wp-image-12638\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.30.06-PM.png\" alt=\"Figure 4 - Shell preferences\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.30.06-PM.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.30.06-PM-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12638\" class=\"wp-caption-text\">Figure 4 &#8211; Shell preferences<\/p><\/div>\n<ol>\n<li>Check Run Command and type in powershell (lowercase)<\/li>\n<li>Click on Run inside shell<\/li>\n<li>Click Never in the Ask before closing section<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>You now have a PowerShell profile. To open a terminal window right to PowerShell, select the Shell Menu from the Terminal menu bar. Then select New Window \/ PowerShell. Viola! Up comes your PowerShell terminal window.<\/p>\n<p>If you ONLY want to use PowerShell as your terminal window, you can set your startup preference to your PowerShell profile:<\/p>\n<div id=\"attachment_12640\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.31.53-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12640\" class=\"size-full wp-image-12640\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.31.53-PM.png\" alt=\"Figure 5 - New window with profile\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.31.53-PM.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.31.53-PM-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12640\" class=\"wp-caption-text\">Figure 5 &#8211; New window with profile<\/p><\/div>\n<p>or set PowerShell as your default profile.<\/p>\n<div id=\"attachment_12642\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.34.59-PM-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12642\" class=\"size-full wp-image-12642\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.34.59-PM-1.png\" alt=\"Figure 6 - Set default profile\" width=\"665\" height=\"589\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.34.59-PM-1.png 665w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-18-at-1.34.59-PM-1-300x266.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><p id=\"caption-attachment-12642\" class=\"wp-caption-text\">Figure 6 &#8211; Set default profile<\/p><\/div>\n<p>There you have it! Happy PowerShelling on your Mac!<\/p>\n<p>UPDATE:<\/p>\n<p>Want PowerShell on your dock for immediate access? In the Terminal Preferences pane, select the PowerShell profile you created. At the bottom of the list click on the gear icon and select Export. This will create a .terminal file. Dragged the terminal file to the right side of your dock (right of the dividing line where your folders and documents live). You now have a Dock icon that immediately starts a PowerShell Terminal!<\/p>\n<div id=\"attachment_12652\" style=\"width: 685px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.01.25-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12652\" class=\"size-full wp-image-12652\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.01.25-AM.png\" alt=\"Figure 7 - Create a .terminal file\" width=\"675\" height=\"697\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.01.25-AM.png 675w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.01.25-AM-291x300.png 291w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/a><p id=\"caption-attachment-12652\" class=\"wp-caption-text\">Figure 7 &#8211; Create a .terminal file<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12653\" style=\"width: 281px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.02.39-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12653\" class=\"size-full wp-image-12653\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-19-at-9.02.39-AM.png\" alt=\"Figure 8 - PowerShell on the Dock\" width=\"271\" height=\"97\" \/><\/a><p id=\"caption-attachment-12653\" class=\"wp-caption-text\">Figure 8 &#8211; PowerShell on the Dock<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Now that PowerShell is available on the Mac, we thought it would be useful to show how easy it is to setup\u00a0a Mac terminal session that automatically opens into PowerShell. Figure 1\u00a0shows\u00a0what we mean. First you need to download the PowerShell macOS package from here (look for the Get PowerShell section in the README.md) and [&hellip;]<\/p>\n","protected":false},"author":4,"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":[1115,2,283,1143,25],"tags":[1151,1163,1165,1164,28,997],"class_list":["post-12633","post","type-post","status-publish","format-standard","hentry","category-bash","category-general","category-howto","category-powershell","category-windows-powershell","tag-mac","tag-macintosh","tag-macos","tag-os-x","tag-powershell","tag-windows-powershell"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12633","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=12633"}],"version-history":[{"count":11,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12633\/revisions"}],"predecessor-version":[{"id":12655,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12633\/revisions\/12655"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=12633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=12633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=12633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}