PowerShell 7 and PnP.PowerShell on Linux
Hi All,
Recently i had a customer who wanted to upload a File on SharePoint.
I've done something similar with PowerShell on Windows and Azure Automation.
Upload file to SharePoint Online with PnP.PowerShell
https://blog.icewolf.ch/archive/2022/01/23/upload-file-to-sharepoint-online-with-pnp-powershell.aspx
Install PowerShell on Linux
As i have a CentOS8 available i did test that. There is a specific Docs from Microsoft that explains how to Install PowerShell on CentOS
Installing PowerShell on CentOS
cat /etc/centos-release
rpm -i https://github.com/PowerShell/PowerShell/releases/download/v7.2.4/powershell-lts-7.2.4-1.rh.x86_64.rpm
pwsh -v

Great PowerShell 7 is installed. Now we need to install the PnP.PowerShell
pwsh
Find-Module PnP.PowerShell
Install-Module PnP.PowerShell

I've created the Script and only changed the Path from the CSV. Upload is sucessfull and the File on Sharepoint has really changed.
./test.ps1

Regards
Andres Bohren
