Skip to content

Commit

Permalink
Merge branch 'dev' into Issue3565
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Feb 9, 2024
2 parents 1b007bb + 8b129ab commit 17444cc
Show file tree
Hide file tree
Showing 36 changed files with 6,136 additions and 5,464 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `Restore-PnPDeletedContainer` cmdlet which recovers a deleted Container from the Recycle Bin. [#3661](https://github.com/pnp/powershell/pull/3661)
- Added the ModerationSettings to be returned with `Get-PnPTeamsChannel` when passing in `-IncludeModerationSettings` and using `-Identity <channelId>` [#3580](https://github.com/pnp/powershell/pull/3580)
- Added `AllowNewMessageFromBots`, `AllowNewMessageFromConnectors`, `ReplyRestriction` and `UserNewMessageRestriction` to `Set-PnPTeamsChannel` which allows setting the moderation settings on a Teams channel [#3580](https://github.com/pnp/powershell/pull/3580)
- Added `Get-PnPWebPermission` cmdlet which retrieves permission given by user for specific web. [#3685](https://github.com/pnp/powershell/pull/3685)
- Added `-HorizontalQuickLaunch` parameter to `Set-PnPWeb` cmdlet to allow navigation orientation to be horizontal. [#3722](https://github.com/pnp/powershell/pull/3722)
- Added `Set-PnPRetentionLabel` and `Reset-PnPRetentionLabel` cmdlets to support setting a retention label on one or more items [#3599](https://github.com/pnp/powershell/pull/3599)

### Fixed

Expand All @@ -35,9 +38,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `Get-PnPFlow` cmdlet to use the newer Flow URLs instead of the old ARM URLs. [#3677](https://github.com/pnp/powershell/pull/3677)
- Fixed `Get-PnPPowerPlatformConnector`, `Get-PnPPowerPlatformEnvironment`, `Get-PnPPowerApp`, `Add-PnPFlowOwner`, `Disable-PnPFlow`, `Enable-PnPFlow`, `Export-PnPFlow`, `Get-PnPFlowOwner`, `Get-PnPFlowRun`, `Remove-PnPFlow`, `Remove-PnPFlowOwner` , `Restart-PnPFlow` and `Stop-PnPFlowRun` cmdlets to use the new HTTP endpoints. [#3687](https://github.com/pnp/powershell/pull/3687)
- Fixed `Add-PnPHubSiteAssociation` cmdlet to allow support for multi-geo scenario. [#3568](https://github.com/pnp/powershell/pull/3568)
- Fixed `Enable/Disable-PnPPageScheduling` cmdlet to also work with Viva connections enabled site. [#3713](https://github.com/pnp/powershell/pull/3713)

### Changed

- `-IsFavoriteByDefault` parameter is now obsolete in `Add-PnPTeamsChannel` cmdlet due to deprecation by Microsoft Graph API. [#3712](https://github.com/pnp/powershell/pull/3712)

### Contributors

- Konrad K. [wilecoyotegenius]
- Leon Armston [LeonArmston]
- Daniel Cecil [danielcecil]
- Rohit Devmore [rohit404404]
- Konrad K. [wilecoyotegenius]
- Kunj Balkrishna Sangani [kunj-sangani]
Expand Down Expand Up @@ -92,10 +103,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added support for executing the 'Invoke-PnPSPRestMethod' cmdlet in a batch [#3565](https://github.com/pnp/powershell/pull/3565)
- Added `Get-PnPSiteSetVersionPolicyProgress` cmdlet which allows for getting the progress of setting a version policy for existing document libraries on a site [#3564](https://github.com/pnp/powershell/pull/3564)
- Added `EnableSensitivityLabelForPDF` to `Set-PnPTenant` and `Get-PnPTenant` [#3581](https://github.com/pnp/powershell/pull/3581)
- Changed `Restore-PnPRecycleBinItem` , made `-Identity` parameter as non-mandatory. [#2499](https://github.com/pnp/powershell/pull/2499)
- Added the ability to set Manage and FullControl permissions directly when using Sites.Selected with `Grant-PnPAzureADAppSitePermission` [#3617](https://github.com/pnp/powershell/pull/3617)
- Added `Remove-PnPMicrosoft365GroupPhoto` cmdlet which allows removal of profile picture of M365 Group. [#3607](https://github.com/pnp/powershell/pull/3607)


### Fixed

- Fixed `Add-PnPContentTypeToList` cmdlet to better handle piped lists. [#3244](https://github.com/pnp/powershell/pull/3244)
Expand Down Expand Up @@ -448,7 +459,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Improved `Remove-PnPFieldFromContentType` cmdlet to ensure proper null check for non-existing fields. It will now throw proper `Field not found` error. [#2407](https://github.com/pnp/powershell/pull/2407)
- Changed the Microsoft 365 Groups cmdlets to use the `v1.0` endpoint instead of the `beta` [#2426](https://github.com/pnp/powershell/pull/2426)
- Changed `Add-PnPMicrosoft365GroupToSite` to longer require the `-Url` parameter to be specified. If its not provided, the currently connected to site will be groupified. [#2496](https://github.com/pnp/powershell/pull/2496)
- Changed `Restore-PnPRecycleBinItem` , made `-Identity` parameter as non-mandatory. [#2499](https://github.com/pnp/powershell/pull/2499)

### Removed

Expand Down
55 changes: 55 additions & 0 deletions MIGRATE-2.0-to-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Updating from PnP PowerShell 2.x to 3.x

_This is a draft document, version 3 is not yet available_

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. PowerShell 7.4 or later is required.

- The 3.x version of PnP PowerShell will work only on PowerShell 7.4 or later versions.

## Steps to update from 2.x to 3.x

- Download and install the latest PowerShell version from [this GitHub releases link](https://aka.ms/powershell-release?tag=lts)

Or

- For Windows environments, please use [this link](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows)

- For Linux based environments, please use [this link](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux)

- For Mac OS envoronments, please use [this link](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos)

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

```powershell
Install-Module -Name "PnP.PowerShell"
```

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

```powershell
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 to v7.4 or later.

Recommend referring to these 2 links:

- [DevOps Snack: Change PowerShell version in YAML](https://microsoft-bitools.blogspot.com/2021/02/devops-snack-change-powershell-version.html)
- [How to enable PowerShell core in Azure Pipeline?](https://theautomationcode.com/how-to-enable-powershell-core-in-azure-pipeline/)

## Breaking changes

| **Cmdlet** | **Comment** |
| ----------- | ---------------------- |
| Get-PnPRetentionLabel | The `Get-PnPRetentionLabel` cmdlet has been renamed to `Get-PnPTenantRetentionLabel` |
| Get-PnPLabel | The `Get-PnPLabel` cmdlet has been renamed to `Get-PnRetentionLabel` |

## Other notable changes

- ...

## Changes to output type

- ...
5 changes: 3 additions & 2 deletions documentation/Add-PnPTeamsChannel.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ Accept wildcard characters: False
```
### -IsFavoriteByDefault
Allows you to specify if the channel is by default visible for members
Allows you to specify if the channel is by default visible for members.
**This parameter is obsolete. [Microsoft Graph API docs](https://learn.microsoft.com/en-us/graph/api/resources/channel?view=graph-rest-1.0#properties) mention that it only works when you create a channel in Teams creation request. It will be removed in a future version.**
```yaml
Type: Boolean
Expand Down Expand Up @@ -156,4 +157,4 @@ Accept wildcard characters: False
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
9 changes: 8 additions & 1 deletion documentation/Export-PnPPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Export-PnPPage -Identity Home.aspx

Exports the page 'Home.aspx' to a new PnP Provisioning Template

### EXAMPLE 2
```powershell
Export-PnPPage -Identity HR/Home.aspx -Out template.pnp
```

Exports the page 'Home.aspx' to a new PnP Provisioning Template

## PARAMETERS

### -Configuration
Expand Down Expand Up @@ -93,7 +100,7 @@ Accept wildcard characters: False
```
### -Identity
The name of the page
The name/identity of the page. This can be a page instance or the filename of the page. I.e. if the page is called MyPage.aspx and is located in the root of the Site Pages library, provide "MyPage" or "MyPage.aspx". If the page is called MyOtherPage.aspx and is located inside a subfolder called HR located in the root of the Site Pages library, provide "HR/MyOtherPage" or "HR/MyOtherPage.aspx
```yaml
Type: ClientSidePagePipeBind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteSetVersionPolicyProgress.html
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteVersionPolicyProgress.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPSiteSetVersionPolicyProgress
title: Get-PnPSiteVersionPolicyProgress
---

# Get-PnPSiteSetVersionPolicyProgress
# Get-PnPSiteVersionPolicyProgress

## SYNOPSIS
Get the progress of setting version policy for existing document libraries on the site.

## SYNTAX

```powershell
Get-PnPSiteSetVersionPolicyProgress [-Connection <PnPConnection>]
Get-PnPSiteVersionPolicyProgress [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -25,7 +25,7 @@ This cmdlet allows retrieval of the progress of setting version policy for exist

### EXAMPLE 1
```powershell
Get-PnPSiteSetVersionPolicyProgress
Get-PnPSiteVersionPolicyProgress
```

Returns the progress of setting version policy for existing document libraries on the site.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Get-PnPRetentionLabel
# Get-PnPRetentionLabel

## SYNOPSIS
Gets the Microsoft Purview retention labels that are within the tenant
Gets the Microsoft Purview retention labels that are available within the tenant

## SYNTAX

Expand Down
76 changes: 76 additions & 0 deletions documentation/Get-PnPWebPermission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPWebPermission.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPWebPermission
---

# Get-PnPWebPermission

## SYNOPSIS
Returns the explicit permissions for a specific SharePoint Web given a user or group by id.

## SYNTAX

```powershell
Get-PnPWebPermission [-Identity] <WebPipeBind> -PrincipalId <Int32>
```

## DESCRIPTION

This cmdlet retrieves the web permissions (role definitions) for a specific user or group in a provided web.

## EXAMPLES

### EXAMPLE 1
```powershell
Get-PnPWebPermission -Identity (Get-PnPWeb) -PrincipalId 60
```

Returns the permissions for the SharePoint group with id for the current Web.

### EXAMPLE 2
```powershell
Get-PnPWebPermission -Identity "subsite" -PrincipalId (Get-PnPGroup -Identity DemoGroup).Id
```

Returns the permissions for the SharePoint group called DemoGroup for a given subsite path.

## PARAMETERS


### -Identity
The id, name or server relative url of the Web to retrieve the permissions for.

```yaml
Type: WebPipeBand
Parameter Sets: (All)
Aliases: Name

Required: False
Position: 0
Default value: (CurrentWeb)
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -PrincipalId
The id of a user or a SharePoint group. See Get-PnPUser and Get-PnPGroup.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases: Name

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
90 changes: 0 additions & 90 deletions documentation/Reset-PnPLabel.md

This file was deleted.

Loading

0 comments on commit 17444cc

Please sign in to comment.