Skip to content

Commit

Permalink
Merge pull request #3802 from KoenZomers/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
KoenZomers committed Mar 1, 2024
2 parents c215d5d + 5d65bcb commit 349dfaf
Show file tree
Hide file tree
Showing 154 changed files with 10,564 additions and 15,382 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/builddocsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout master branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: master
path: master
- name: Checkout dev branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: dev
path: dev
- name: Checkout gh-pages branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildexternalhelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Building Help File
env:
RUNSINACTION: 1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/buildpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PnP.Framework
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pnp/pnpframework
path: pnpframework
ref: 'dev'
- name: Checkout PnP.Core
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pnp/pnpcore
path: pnpcore
ref: 'dev'
- name: Checkout PnP.PowerShell
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: powershell
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/checkdocumentationbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: master
path: master
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: dev
path: dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cleanupnightlyreleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: dev
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Unlist nightly nuget packages
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nightlyrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
7.x
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.PAT }}
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: windows-2022
needs: [ build ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build an image
run: |
$VERSION="$(cat ./version.txt)-nightly"
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: windows-2019
needs: [ build ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build an image
run: |
$VERSION="$(cat ./version.txt)-nightly"
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build an image
run: |
VERSION=$(cat ./version.txt)-nightly
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish-docker-windows-2022:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build and Publish All
shell: pwsh
run: |
Expand All @@ -17,7 +17,7 @@ jobs:
publish-docker-windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build and Publish All
shell: pwsh
run: |
Expand All @@ -26,7 +26,7 @@ jobs:
publish-docker-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build and Publish All
shell: pwsh
run: |
Expand Down
71 changes: 69 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,74 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Added

- Added `-IsDataAccessInCardDesignerEnabled` to `Set-PnPTenant` which allows for configuring Viva Connections Adaptive Cards to connect to backend services for their data [#3635](https://github.com/pnp/powershell/pull/3635)
- Added `Remove-PnPContainer` cmdlet to remove the SharePoint embed container. [#3629](https://github.com/pnp/powershell/pull/3629)
- Added `Convert-PnPFile` cmdlet which allows for a file to be converted to from one format to another. [#3435](https://github.com/pnp/powershell/pull/3435) & [#3643](https://github.com/pnp/powershell/pull/3643)
- Added `Merge-PnPTerm` cmdlet which allows merging of one term into another. [#3638](https://github.com/pnp/powershell/pull/3638)
- Added `Get-PnPDeletedContainer` cmdlet which returns a list of all deleted Containers in the recycle bin. [#3648](https://github.com/pnp/powershell/pull/3648)
- Added `-Batch` parameter to `Add-PnPGroupMember` cmdlet which allows adding members to a SharePoint group in a batch. [#3651](https://github.com/pnp/powershell/pull/3651)
- Added `Get-PnPContainerTypeConfiguration` cmdlet which fetches the container type configuration values. [#3660](https://github.com/pnp/powershell/pull/3660)
- Added `-AppBypassInformationBarriers` and `-DefaultOneDriveInformationBarrierMode` parameters to `Set-PnPTenant` cmdlet. [#3679](https://github.com/pnp/powershell/pull/3679)
- Added `Add-PnPFileAnalyticsData` cmdlet to allow retrieval of file analytics data. [#3644](https://github.com/pnp/powershell/pull/3644)
- Added `Add-PnPSiteAnalyticsData` cmdlet to allow retrieval of site analytics data. [#3645](https://github.com/pnp/powershell/pull/3645)
- Added `Get-PnPPowerPlatformSolution` cmdlet to Power Platform solutions. [#3675](https://github.com/pnp/powershell/pull/3675)
- Added `New-PnPContainerType` cmdlet to create a new SharePoint container type. [#3669](https://github.com/pnp/powershell/pull/3669)
- Added `Remove-PnPContainerType` cmdlet which removes a specific container type. [#3689](https://github.com/pnp/powershell/pull/3689/)
- 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 support for different sovereign cloud environment for Power Platform related cmdlets [#3725](https://github.com/pnp/powershell/pull/3725)
- 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)
- Added `-SiteThumbnailUrl` parameter to `Set-PnPWebHeader` cmmdlet to support setting thumbnail of the site. [#3746](https://github.com/pnp/powershell/pull/3746)
- Added `-Like` parameter to `Set-PnPPage` cmdlet to support liking/unliking a modern page. [#3788](https://github.com/pnp/powershell/pull/3788)
- Added `Get-PnPPageLikedByInformation` cmdlet to retrieve list of users who liked a modern page. [#3781](https://github.com/pnp/powershell/pull/3781)

### Fixed

- Fixed `Grant-PnPAzureADAppSitePermission` cmdlet which allows it to work in multi-geo environment. [#3658](https://github.com/pnp/powershell/pull/3658)
- Fixed `Get-PnPTeamsChannelMessageReply` cmdlet which didn't work correctly when `-IncludeDeleted` parameter was not specified. [#3676](https://github.com/pnp/powershell/pull/3676)
- Fixed `Add-PnPNavigationNode` cmdlet to also search for nodes in child navigation items. [#3625](https://github.com/pnp/powershell/pull/3625)
- 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)
- Fixed `Register-PnPManagementShellAccess` and `Register-PnPAzureADApp` cmdlets to also work with custom environment. [#3763](https://github.com/pnp/powershell/pull/3763)
- Fixed `Set-PnPPPage` cmdlet to only change layout of the page if the parameter is specified. [#3777](https://github.com/pnp/powershell/pull/3777)
- Fixed `New-PnPGroup` cmdlet to correctly show the group description with HTML making it similar to `Set-PnPGroup`.

### 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)
- `Get-PnPSiteTemplate` will now only contain `PersistPublishingFiles`, `IncludeNativePublishingFiles`, `IncludeTermGroupsSecurity`, `IncludeSearchConfiguration`, `SkipVersionCheck` and `PersistMultiLanguageResources` if these are provided with the cmdlet as switch parameters [#3715](https://github.com/pnp/powershell/pull/3715)
- Due to backend changes in Microsoft Graph, `Get-PnPUnifiedAuditLog` cmdlet requires some more permissions. Updated the cmdlet to handle that. [#3745](https://github.com/pnp/powershell/pull/3745)

### Contributors

- Arleta Wanat [PowershellScripts]
- Jenny Wu [msjennywu]
- Aimery Thomas [a1mery]
- Nils Andresen [nils-a]
- Gautam Sheth [gautamdsheth]
- Nishkalank Bezawada [NishkalankBezawada]
- Konrad K. [wilecoyotegenius]
- Leon Armston [LeonArmston]
- Daniel Cecil [danielcecil]
- Rohit Devmore [rohit404404]
- Konrad K. [wilecoyotegenius]
- Kunj Balkrishna Sangani [kunj-sangani]
- Koen Zomers [koenzomers]
- Reshmee Auckloo [reshme011]
- Nishkalank Bezawada [NishkalankBezawada]
- Jørgen Wiik [joHKwi]
- Siddharth Vaghasia [siddharth-vaghasia]
- Jürgen Rosenthal-Buroh [JuergenRB]

## [2.3.0]

### Added

- Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant` which allows for configuring the media transcription settings. [#3238](https://github.com/pnp/powershell/pull/3238)
- Added `-Includes` option to `Get-PnPListItem` which allows for specifying additional fields to be retrieved. [#3270](https://github.com/pnp/powershell/pull/3270)
- Added `-AllowCommentsTextOnEmailEnabled` parameter to `Set-PnPTenant` which allows including the surrounding document context in email notification when user is mentioned in document comments. [#3268](https://github.com/pnp/powershell/pull/3268)
Expand Down Expand Up @@ -50,6 +118,7 @@ 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)

Expand Down Expand Up @@ -105,7 +174,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Antti K. Koskela [koskila]
- Christian Veenhuis [ChVeen]
- Kunj Balkrishna Sangani [kunj-sangani]
- Antti K. Koskela [koskila]
- Dave Paylor [paylord]
- [smsdaniel]
- Jim Duncan [sparkitect]
Expand Down Expand Up @@ -406,7 +474,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
57 changes: 57 additions & 0 deletions MIGRATE-2.0-to-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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` |
| Get-PnPPowerPlatformConnector | The `Get-PnPPowerPlatformConnector` cmdlet has been renamed to `Get-PnPPowerPlatformCustomConnector` |
| Connect-PnPOnline | Using `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 |

## Other notable changes

- ...

## Changes to output type

- ...
2 changes: 1 addition & 1 deletion build/Build-Nightly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ if ($runPublish -eq $true) {
}

# Generate predictor commands
./build/Generate-PredictorCommands.ps1 -Version $version
./build/Generate-PredictorCommands.ps1 -Version "nightly"

Write-Host "Generating Documentation" -ForegroundColor Yellow
Set-PSRepository PSGallery -InstallationPolicy Trusted
Expand Down
29 changes: 29 additions & 0 deletions documentation/Add-PnPGroupMember.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Add-PnPGroupMember -Group <GroupPipeBind> -EmailAddress <String> [-SendEmail] [-
[-Connection <PnPConnection>]
```

### Batched
```powershell
Add-PnPGroupMember -LoginName <String> -Group <GroupPipeBind>
[-Connection <PnPConnection>] -Batch <PnPBatch>
```

## DESCRIPTION

Allows to add new user to SharePoint group. The SharePoint group may be specified either by id, name or related object.
Expand All @@ -46,6 +52,16 @@ Add-PnPGroupMember -LoginName user@company.com -Group 5

Add the specified user to the SharePoint group with Id 5

### EXAMPLE 3
```powershell
$batch = New-PnPBatch
Add-PnPGroupMember -LoginName user@company.com -Group 5 -Batch $batch
Add-PnPGroupMember -LoginName user1@company.com -Group 5 -Batch $batch
Invoke-PnPBatch $batch
```

Add the specified users to the SharePoint group with Id 5 in a batch.

## PARAMETERS

### -Connection
Expand Down Expand Up @@ -130,6 +146,19 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -Batch
```yaml
Type: PnPBatch
Parameter Sets: Batched

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
Expand Down
Loading

0 comments on commit 349dfaf

Please sign in to comment.