blog.icewolf.ch

Let's talk about IT!
posts - 2204, comments - 295, trackbacks - 0

My Links

Archives

Post Categories

icewolf

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

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


Print | posted on Wednesday, May 25, 2022 1:25 PM | Filed Under [ PowerShell Linux ]

Powered by:
Powered By Subtext Powered By ASP.NET