Skip to content

Commit

Permalink
Merge branch 'dev' into add-set-pnpcompliancetagonbulkitems-cmdlet
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Feb 8, 2024
2 parents e243ab9 + cb9c7ae commit b73fbc9
Show file tree
Hide file tree
Showing 106 changed files with 18,886 additions and 5,353 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
55 changes: 53 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,55 @@ 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 `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)

### 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)

### 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

- 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 @@ -51,7 +100,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- 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 @@ -98,12 +149,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Contributors

- Pieter Veenstra [Pieter-Veenstra]
- Konrad K. [wilecoyotegenius]
- Dan Cecil [danielcecil]
- 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
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

- ...
2 changes: 1 addition & 1 deletion build/Build-Debug.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if ($LASTEXITCODE -eq 0) {
$documentsFolder = [environment]::getfolderpath("mydocuments");

if ($IsLinux -or $isMacOS) {
$destinationFolder = "$documentsFolder/.local/share/powershell/Modules/PnP.PowerShell"
$destinationFolder = "$HOME/.local/share/powershell/Modules/PnP.PowerShell"
}
else {
$destinationFolder = "$documentsFolder/PowerShell/Modules/PnP.PowerShell"
Expand Down
20 changes: 10 additions & 10 deletions documentation/Add-PnPFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,31 @@ This will upload the file displaytemplate.html to the test folder in the display

### EXAMPLE 3
```powershell
Add-PnPFile -Path .\sample.doc -Folder "Shared Documents" -Values @{Modified="1/1/2016"}
Add-PnPFile -Path .\sample.doc -Folder "Shared Documents" -Values @{Modified="12/28/2023"}
```

This will upload the file sample.doc to the Shared Documents folder. After uploading it will set the Modified date to 1/1/2016.
This will upload the file sample.doc to the Shared Documents folder. After uploading it will set the Modified date to 12/28/2023.

### EXAMPLE 4
```powershell
Add-PnPFile -FileName sample.doc -Folder "Shared Documents" -Stream $fileStream -Values @{Modified="1/1/2016"}
Add-PnPFile -FileName sample.doc -Folder "Shared Documents" -Stream $fileStream -Values @{Modified="12/28/2023"}
```

This will add a file sample.doc with the contents of the stream into the Shared Documents folder. After adding it will set the Modified date to 1/1/2016.
This will add a file sample.doc with the contents of the stream into the Shared Documents folder. After adding it will set the Modified date to 12/28/2023.

### EXAMPLE 5
```powershell
Add-PnPFile -Path sample.doc -Folder "Shared Documents" -ContentType "Document" -Values @{Modified="1/1/2016"}
Add-PnPFile -Path sample.doc -Folder "Shared Documents" -ContentType "Document" -Values @{Modified="12/28/2023"}
```

This will add a file sample.doc to the Shared Documents folder, with a ContentType of 'Documents'. After adding it will set the Modified date to 1/1/2016.
This will add a file sample.doc to the Shared Documents folder, with a ContentType of 'Documents'. After adding it will set the Modified date to 12/28/2023.

### EXAMPLE 6
```powershell
Add-PnPFile -Path sample.docx -Folder "Documents" -Values @{Modified="1/1/2016"; Created="1/1/2017"; Editor=23}
Add-PnPFile -Path sample.docx -Folder "Documents" -Values @{Modified="12/28/2016"; Created="12/28/2023"; Editor=23}
```

This will add a file sample.docx to the Documents folder and will set the Modified date to 1/1/2016, Created date to 1/1/2017 and the Modified By field to the user with ID 23. To find out about the proper user ID to relate to a specific user, use Get-PnPUser.
This will add a file sample.docx to the Documents folder and will set the Modified date to 12/28/2016, Created date to 12/28/2023 and the Modified By field to the user with ID 23. To find out about the proper user ID to relate to a specific user, use Get-PnPUser.

### EXAMPLE 7
```powershell
Expand Down Expand Up @@ -338,7 +338,7 @@ Currency: -Values @{"Number" = "10"}
Currency: -Values @{"Currency" = "10"}
Date and Time: -Values @{"DateAndTime" = "03/10/2015 14:16"}
Date and Time: -Values @{"DateAndTime" = "04/20/2023 14:16"} (use mm/dd/yyyy)
Lookup (id of lookup value): -Values @{"Lookup" = "2"}
Expand Down Expand Up @@ -375,4 +375,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)
Loading

0 comments on commit b73fbc9

Please sign in to comment.