On Friday 9th Oct 2020, Erwin van Hunen, the “father” on PnP PowerShell announced on Twitter the release of the next major version of PnP PowerShell with cross-platform support, running on PowerShell Core. So naturally, like a kid with a new toy, wanted to see if I can get this working on a Raspberry Pi 4. I was pleasantly surprised to find this was a straight-foreword process, for both setting up PowerShell and installing the module to get going.
Kudos to the PnP team!!
Before I start, a lot of work has gone into creating the new version of PnP PowerShell, as this also relies on PnP Framework, the next generation of PnP Sites Core. It is worth checking out these resources on the announcements to get more details, on the direction these community tools are going for the future:
The usual prerelease note, both the PowerShell install on a Raspberry Pi is listed as Experimental which is limited to Raspberry Pi 2,3,4 – not Pi Zero’s. Additionally, the new PnP PowerShell module (v0.1.6-nightly) is also a prerelease nightly build – the great thing about Raspberry Pi’s, is you can experiment both hardware and software, so let’s play!
Installing the PowerShell on Raspberry Pi
This part comes from Microsoft, by finding the PowerShell installer for Linux, there is a version for Raspbian, quite simply follow the instructions in this link, and you can quickly get going. The script looks like this, but refer to the above link for the latest updates:
Installing the PnP PowerShell Module (0.1.6-nightly, prerelease)
After PowerShell is installed, start up a session by going:
After this is installed, use the instructions in the new PnP PowerShell repo – this is a new PowerShell module, not the well known “SharePointPnPOnline” module, run:
Install-Module -Name PnP.PowerShell -AllowPrerelease
After the module is installed, connect to SharePoint, as you would normally do in Windows:
Connect-PnPOnline https://tenant.sharepoint.com # Enter your credentials then Get-PnPList
This is another cool example of how to include other types of devices in projects, I look forward to exploring the new options further what you can do with this environment as the module advances. Remember, this will only connect to SharePoint Online, On-Premises support has been removed from the new modules.
- Installing PowerShell on Linux – https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#raspbian
- New PnP PowerShell Module GitHub Repo – https://github.com/pnp/powershell
- PowerShell Gallery – https://www.powershellgallery.com/packages/PnP.PowerShell
Sharing is caring, Enjoy!