PnP.PowerShell 2.9 released

PnP.PowerShell 2.9 released

Hi All,

Today a new Version of PnP.PowerShell has been released to the PowerShell Gallery.

A Release on GitHub has not yet shown up

I am using the new PSResourceGet here instead of the PowerShellGet commands.

To check what version is installed and what’s available from the PowerShell Gallery use the following Commands

Get-InstalledPSResource PnP.PowerShell -Scope CurrentUser
Find-PSResource PnP.PowerShell

Uninstall the old version of the PowerShell Module and install the new one

Uninstall-PSResource PnP.PowerShell -Scope CurrentUser
Install-PSResource PnP.PowerShell -Scope CurrentUser
Get-InstalledPSResource PnP.PowerShell -Scope CurrentUser

Note: PNP.PowerShell does not work in PowerShell 5.x anymore

Works fine in PowerShell 7.x

Connect-PnPOnline -Url "https://icewolfch.sharepoint.com/sites/DemoTemplate/" -Interactive

Some basic tests

Get-PnPContext
Get-PnPFolder -Url "Freigegebene Dokumente/Project/Script"
Get-PnPFileVersion -Url "Freigegebene Dokumente/Project/Script/AADUsers.csv"
Disconnect-PnPOnline 

You can also use the -LaunchBrowser Parameter

Connect-PnPOnline -Url "https://icewolfch.sharepoint.com/sites/DemoTemplate/" -Interactive -LaunchBrowser

Register PnPEntraIDApp

Register-PnPEntraIDApp -ApplicationName IcewolfPNPPowerShell -Tenant icewolfch.onmicrosoft.com -Store CurrentUser -Interactive -GraphApplicationPermissions "User.Read.All" -SharePointApplicationPermissions "Sites.Read.All"

That does not work as long as you’re in C:\ (or any other root Directory)

cd temp
Register-PnPEntraIDApp -ApplicationName IcewolfPNPPowerShell -Tenant icewolfch.onmicrosoft.com -Store CurrentUser -Interactive -GraphApplicationPermissions "User.Read.All" -SharePointApplicationPermissions "Sites.Read.All"

The App consent is approved

Now the Entra ID App has been created

Entra ID App

Certificate on computer

On the Computer that has run Register-PnPEntraIDApp in the current User Certificate Store there is the Certificate stored to authenticate

Authenticate with App and Certificate

Connect with App and Certificate

Connect-PnPOnline -Url "https://icewolfch.sharepoint.com/sites/DemoTemplate/" -ApplicationId "7bc9048b-ba56-4fe0-9b52-ba8f8a6e18a6" -Tenant "icewolfch.onmicrosoft.com" -Thumbprint "55ebadf1a14df8e088ef985730a8cfb01749400c"
Get-PnPContext

Or you can simply use my M365PSProfile Module to update the most important M365 Modules - find the Documentation here: https://github.com/fabrisodotps1/M365PSProfile/

Install-PSResource -Name M365PSProfile
Add-M365PSProfile
Install-M365Module

Regards
Andres Bohren

PowerShell Logo