Updating from PnP PowerShell 2.x to 3.x

June 2, 2025 ยท View on GitHub

The 3.x version of PnP PowerShell is based exclusively on .NET 8.0, which means that it will not work on older PowerShell editions like PowerShell 5.1, ISE or PowerShell 7.3 or older. It will work only on PowerShell 7.4.0 or later editions.

Steps to update from 2.x to 3.x

Or

  • For Windows environments, please use this link

  • For Linux based environments, please use this link

  • For Mac OS environments, please use this link

Once PowerShell 7.4.0 or later is downloaded and installed in your environment, you can install the PnP PowerShell module like you normally do.

Install-Module -Name "PnP.PowerShell"

If you want to install or update to the latest nightly built prerelease of PnP PowerShell, run:

Install-Module -Name "PnP.PowerShell" -AllowPrerelease

Changes needed in Azure DevOps/GitHub Actions/Pipelines

If you are using PnP PowerShell in Azure Devops, GitHub Actions or other pipeline infrastructure, you will have to update your PowerShell version from v5 or v7.2.x to v7.4.0 or later.

Recommend reading these 2 links:

Breaking changes in 3.0

CmdletComment
Add-PnPTeamsChannelThe parameter IsFavoriteByDefault has been removed as it was not supported by Graph API
Connect-PnPOnlineUsing Connect-PnPOnline without specifying an authentication option will now default to using an interactive login. If you still want to use logon using client credentials, provide them using -Credentials instead
Connect-PnPOnlineRemoved -UseWebLogin on Connect-PnPOnline. It used a very outdated and questionable (reusing an auth cookie) authentication method which implementation broke easily. If you require an ACS connection for certain functionality, consider using -ClientId in combination with -ClientSecret instead.
Connect-PnPOnlineRemoved -LaunchBrowser option for Interactive login flows. It is the default now and removed the popup based authentication option
Connect-PnPOnlineRemoved -LaunchBrowser option for Device Login flows. It is the default now.
Connect-PnPOnlineRemoved -SPOManagementShell option for authentication. It reduces the risk of changes from Microsoft which can potentially break the scripts . Use your own Entra ID app instead via -ClientId parameter.
Get-PnPRetentionLabelThe Get-PnPRetentionLabel cmdlet has been renamed to Get-PnPTenantRetentionLabel
Get-PnPLabelThe Get-PnPLabel cmdlet has been renamed to Get-PnPRetentionLabel
Get-PnPPowerPlatformConnectorThe Get-PnPPowerPlatformConnector cmdlet has been renamed to Get-PnPPowerPlatformCustomConnector
Get-PnPAppAuthAccessTokenThis cmdlet has been removed. Use Get-PnPAccessToken -ResourceTypeName SharePoint instead to get SharePoint access token.
Get-PnPGraphAccessTokenThis cmdlet has been removed. Use Get-PnPAccessToken instead.
Get-PnPSharingLinkThe parameter -FileUrl has been removed. It was marked obsolete. Use -Identity instead.
Invoke-PnPTransformationRemoved. It was never supported nor fully implemented.
Publish-PnPCompanyAppThe Publish-PnPCompanyApp cmdlet has been removed
Reset-PnPLabelUse Reset-PnPRetentionLabel
Request-PnPAccessTokenThis cmdlet has been removed. Use Get-PnPAccessToken instead.
Remove-PnPUserThe parameter -Confirm has been removed. Use -Force instead.
Remove-PnPAvailableSiteClassificationThe parameter -Confirm has been removed. Use -Force instead.
Remove-PnPNavigationNodeThe parameters -Title and -Header have been removed. They were marked obsolete. Use -Identity instead.
Register-PnPEntraIDAppRemoved -Interactive,-LaunchBrowser, -NoPopup and credential based auth. The default auth method is now Interactive.
Register-PnPEntraIDAppForInteractiveLoginRemoved -Interactive, -LaunchBrowser,-NoPopup and credential based auth. The default auth method is now Interactive.
Set-PnPLabelUse Set-PnPRetentionLabel
Send-PnPMailIt now throws a warning about the retirement of SharePoint SendEmail API, if you are sending mails via SharePoint. To ignore the warning, use -ErrorAction SilentlyContinue along side the cmdlet. Recommendation is to use Send-PnPMail with Microsoft Graph
Send-PnPMailThe support for sending mails via SMTP servers is now removed. It is the recommendation of .NET as SMTP doesn't support modern protocols. So, the parameters -EnableSSL , -UserName, -Password, -Server and -ServerPort are now removed. Use Send-PnPMail with Microsoft Graph
Set-PnPMinimalDownloadStrategyRemoved cmdlet. If you need the functionality you can always turn on the feature with Enable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a or turn it off with Disable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a
Set-PnPTraceLogRemoved cmdlet and introduced Start-PnPTraceLog and Stop-PnPTracelog with similar parameters and functionality

Other notable changes

Changes to output type

CmdletComment
Get-PnPAccessTokenThe output type is now Microsoft.IdentityModel.JsonWebTokens.JsonWebToken, earlier it was System.IdentityModel.Tokens.Jwt
Get-PnPCustomActionThe output type is now PnP.Core.Model.SharePoint.UserCustomAction, earlier it was Microsoft.SharePoint.Client.UserCustomAction