How To Add PowerShell v7 Preview to the New Windows Terminal

In this quick post I’ll show you how to add PowerShell v7 preview 1 to the new Windows Terminal.

Background

The new Windows Terminal was announced at Build this year and has been available (building from source code yourself) through the Microsoft/Terminal GitHub repo.  A very early preview of the Windows Terminal is now available through the Microsoft Store (link).  I haven’t verified but I believe you’ll need a few prerequisites in order to install.  Out of the box the current preview of Windows Terminal offers:

  • PowerShell Core (v6)
  • Windows PowerShell (v5)
  • CMD (command prompt)
  • WSL (Windows Sub-system for Linux, legacy console)

Solution

After installing the Windows Terminal from the Microsoft Store, open the Settings from the dropdown menu (or click “Ctrl + ,”).

Find the “profiles” element in the settings file and add the following JSON snippet to the array.  Verify the “commandline” and “icon” locations match where PowerShell v7 preview 1 is installed on your machine.

{
"acrylicOpacity" : 0.5,
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"guid" : "{90cbdc15-f4fe-49d2-a245-ec066b70845f}",
"historySize" : 9001,
"icon" : "C:\\Program Files\\PowerShell\\7-preview\\assets\\Powershell_av_colors.ico",
"name" : "PowerShell 7 preview",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
}

Here is a link to my complete profiles.json for comparison.

After you’ve added the above element you’ll now see PowerShell v7 Preview in your dropdown list of available shells with the proper icon.  For an added bonus I also added Zsh (with the Oh My Zsh framework for auto-suggestions and more) based on seeing demos from Jeff Hollan showcasing that shell.

WT PS v7 preview-1

Below screenshot shows PowerShell v7 Preview in use and verifying the PSVersion.

WT PS v7 preview-2

Conclusion

I’m very excited to begin using the Windows Terminal more in my daily tasks.  Being able to switch back and forth between multiple shells (specifically PowerShell v5 and v6/v7) is possible in Visual Studio Code but this will be a much easier solution for many of my scenarios.  Hopefully someone else will find this helpful as well.

 

-Frog Out

PowerShell Script to Find Connectors from PowerApps Apps

In this post I’ll share a script I developed for a customer to find which connectors are used by which PowerApps apps.  Currently this is not something available through the Power Platform Admin Center.  Feel free to use this script as you see fit.  This script is provided as-is without any warranties of any kind.  If you update or adapt it and decide to re-post please provide attribution.

Script

Note: If you do not see the below Gist please refer to code at this location: PS-Get_PowerApps_App_Connections.ps1

Sample output

image.png

You may notice that the output contains a complex property for the Connections.  It has been some time since I worked with formatting output in PowerShell.  If you have an improvement to the formatting please share back suggestion and I’ll update the sample script.

-Frog Out

Wrap Up from Microsoft Ignite 2015

   This was the first year of the Microsoft Ignite conference which merged a number of previous conferences including TechEd, SharePoint Conference, Project Conference, and more.  With over 23,000 attendees, a new venue, and numerous Microsoft senior leadership and product group in attendance (including CEO Satya Nadella himself) this was definitely a huge event.  Rather than re-capping the event itself I wanted to take a minute to mention a few items that I heard / saw at the conference.  I am still downloading and viewing a number of sessions that I couldn’t attend (same time as another session or room was at capacity) but these are highlights that I wanted to share with others.

 

Recap

  • No “internal” FIM in SharePoint 2016 – SharePoint 2016 will not ship with a version of the Forefront Identity Manager product included.  This is a fairly big deal for any customers that are using the “SharePoint Synchronization” option (allows for import and export of content to / from SharePoint) for the User Profile Sync in 2010 or 2013.  Your options in 2016 will be the Active Directory Import (same as 2007 and re-introduced in 2013) or “external” FIM which is installed and managed outside of SharePoint Server.  See the following resources for more details and how to install FIM 2010 R2 + SP1 with SharePoint 2013 so that you can start planning today if you do need the full features of syncing data into and out of SharePoint.

What’s New for IT Professionals in SharePoint Server 2016 (session recording with announcement)

Configuring SharePoint 2013 for the Forefront Identity Manager 2010 R2 Service Pack 1 Portal (install overview)

  • Project Siena – Project Siena looks like a viable alternative (not replacement) for many (smaller) custom development scenarios.  Essentially it is an app that lets you build other apps.  I do not see this replacing InfoPath, Lightswitch, and half a dozen other technologies that have popped up over the past few years but I do see a promising future for this technology (HTML5 + JS based, similar to many other tech stacks that Microsoft is promoting).  Note that it is still in a beta release last time I checked but the fact that it caters to the Excel power user with similar syntax merged with an easy drag and drop interface feels like this could gain traction better than some other tools.  If you aren’t familiar with Project Siena you really need to see it to understand it.

Microsoft Project Siena: Build Apps and Create New Mobile Solutions (session recording with demos)

Microsoft Project Siena (Beta) (product site)

  • New SharePoint hybrid search option – Hybrid search is receiving a huge update / upgrade later this year.  In it’s current (May 2015) form SharePoint hybrid search involves separate search service applications / indices for on-prem farms and Office 365 / SharePoint Online.  If you query one source you can federate the query to the other and get results in a separate result block.  The problem though is that configuration can be fairly complex, search results aren’t integrated (in-line with each other), and you likely have a large number of servers on-prem for the search service.  Later this year (target timeframe, subject to change) Microsoft will release an update which will allow an on-prem “cloud search service application” to crawl and parse content but then push the metadata up to Office 365 for indexing, querying, etc.  The massive benefit of this is that your on-prem content will then be able to be used in other services like Delve, Office 365 data loss prevention (DLP), and others that currently have no expected on-prem release (or won’t be supported until future releases of SharePoint). Additionally you will need a much smaller on-prem server footprint to support search (the example given was going from 10+ search servers down to 2).  This is a big win in my opinion and I can’t want to test it out when it is released.

Implementing Next Generation SharePoint Hybrid Search with the Cloud Search Service Application (session recording)

  • Nano Server – Nano Server is a new installation option for Windows Server 10 (Server 2016 or whatever the final name ends up as) akin to Server Core in the past.  There were a number of sessions that talked about how small the footprint of Nano Server will be (400MB, yes MB compared to 8+ GB of server + GUI “full” edition).  The changes that this introduces not only affect performance but also re-architecting tools to work remotely (there is no local logon or UI for Nano Server, everything must be done remotely).  Things like Event Viewer, Task Manager, Local Services, etc. can be accessed remotely in a web UI similar to the “new” Azure Portal UI (super slick, take a look).  This may sound scary to some admins who are used to having RDP or locally logging on to a server but listen to Jeffrey Snover’s take on this.  We are IT Professionals and this is a technology that will reduce number of reboots, make servers more secure, reduce infrastructure footprint, and have numerous other benefits.  You owe it to yourself and your company to learn about this and see if it will work for the services you provide.

Nano Server (session recording)

Nano Server: The Future of Windows Server Starts Now (session recording)

Remotely Managing Nano Server (session recording)

  • PowerShell – Getting to see Jeffrey Snover (inventor or PowerShell) and Don Jones (first follower of PowerShell, see the link in slide deck) geek out about PowerShell was one of the best sessions I got to see at Ignite.  Hard to describe in words hence I recommend go watch the recording.  Jeffrey had some great advice about using PowerShell as a tool to explore and dive into problems or scenarios you are trying to solve.  That sense of adventure can be a motivating force for your personal and professional careers.  It was really inspiring and I love the fact that Jeffrey (and Don’s) mindset is spreading to so many others these days.

Windows PowerShell Unplugged with Jeffrey Snover (session recording)

 

   On a side note I also wanted to mention one of the obvious but not always talked about benefits of going to a conference like this in-person.  During the week I was able to introduce myself to a number of presenters that I had previously not met.  Some were MVPs, fellow Premier Field Engineers (PFEs), product group members, and more.  The connections you make can last for years and provide an invaluable network for sharing information and getting assistance when you are in need.  I even got a PowerShell sticker directly from Jeffrey Snover himself (another personal highlight).

WP_20150511_001

 

Conclusion

   This is just a short list of some of the sessions that I attended along with highlights or key points that I wanted to share.  If I find anything else significant from the recordings I am going back to watch I’ll update this post.  For now though go check out the recordings above or the hundreds of other ones that are up on Channel 9.  I encourage you to attend next year when Ignite 2016 will be in Chicago again May 9-13.

 

      -Frog Out

Slides and Scripts from DogFood Conference 2014

   I was pleased to once again speak at the Dog Food Conference here in Columbus, OH.  I believe this is the 3rd year that I have spoken and the 4th or 5th year that I have attended.  The venue has moved to a more spacious location which definitely helped with giving attendees, speakers, and vendors more room to spread out,  I was especially happy to meet up with dozens of previous customers and co-workers at the conference.  This really is a great mix of audiences (developers, IT pros, and business users), customer segments, and topics (SharePoint, .Net, PowerShell, BI, ALM, and more).

   Thanks to everyone who attended my session at the very end of the last day of the conference.  We had a number of good side discussions and questions throughout the presentation.  Below are my slides and scripts.

 

Demo PowerShell Scripts

 

Slidedeck

 

      -Frog Out

Slides and Scripts from SharePoint Cincy 2014

   I was pleased to present at SharePoint Cincy again for the third year.  Geoff and all the organizers do a great job.  My presentation this year was “PowerShell for Your SharePoint Tool Belt”.  Below are my slides and demo scripts.  Thanks for all who attended, I hope you found something that will be useful for you in your work.

 

Demo PowerShell Scripts

 

Slidedeck

 

      -Frog Out

PowerShell Script To Determine If SharePoint List Uses InfoPath Forms

   Recently I had a request from a customer to find which SharePoint 2010 / 2013 lists are using InfoPath forms for their data entry (also known as enterprise forms for a SharePoint list).  In this post I will show you a PowerShell script to determine if a SharePoint list is using InfoPath forms.

 

Problem

  As you may have heard, InfoPath as a product will not be receiving any future releases (see InfoPath roadmap update blog post).  Being able to find SharePoint lists using InfoPath forms may be useful to you now.

 

Solution

   Special thanks goes out to Joe Rodgers (fellow PFE at Microsoft) who helped me narrow down the specific properties to look at.  The property that we want is not at the base of the SPList properties nor on the SPList.Forms properties like I had hoped.  Instead you will need to dig a few levels down.  I found the property at SPList.ContentTypes[0].ResourceFolder.Properties[“_ipfs_infopathenabled”].  If this setting is true then your list is using InfoPath forms for data entry.  If it is false then it is using out of the box SharePoint forms.

 

Add-PSSnapin microsoft.sharepoint.powershell 
$webURL = <Your Site URL> 
$documentLibraryName = <name of document library> 

$web = Get-SPWeb 
$list = $web.Lists[“$documentLibraryName”] 
$isUsingInfoPath = $list.ContentTypes[0].ResourceFolder.Properties[“_ipfs_infopathenabled”] 
Write-Output $isUsingInfoPath 

 

Conclusion

   This script will determine if a single SharePoint list is using InfoPath forms or not.  You could easily expand this to work with multiple lists or sites (similar to my PowerShell Script to Determine Number of Files in SharePoint 2010 or 2013 Document Libraries).  Feel free to adapt the above snippet in this post to your needs but please attribute rights if you republish.

 

      -Frog Out