How to running PnP Powershell on Linux

January 23, 2021

Last post we went through how to install Powershell and PnP on linux, in this post we are going make it easier to use :)

So how to we start using Powershell ? Well for short commands you can always start terminal:

screenshot from 2021 01 23 23 02 32

after that we type pwsh and powershell will start:

screenshot from 2021 01 23 23 03 09

Now your regular PnP commands will work as usual :) I’ve tested on SharePoint online and creating a team works perfectly:

screenshot from 2021 01 23 23 10 10

But what if you want to create a script? Well ISE doesn’t exist for linux or it kinda does with help from Visual studio code:

By pressing Ctrl + P we can enable ISE mode. So what is ISE mode ? exactly how it sounds :) It converts your VS Code to Powershell ISE:

screenshot from 2021 01 23 23 14 03

screenshot from 2021 01 23 23 17 29

This works was same old ISE that we are used to with some extra features like getting a description on how command works:

screenshot from 2021 01 23 23 27 45

But what if you want to go back to the regular vs code, well press Ctrl + P and select disable ISE :

screenshot from 2021 01 23 23 31 02


Your Modern Workplace

© 2020 Nicolas Kheirallah