Skip to content

Commit

Permalink
Merge branch 'pnp:dev' into rssaddsites
Browse files Browse the repository at this point in the history
  • Loading branch information
reshmee011 authored Sep 8, 2024
2 parents cdca73d + ee8c330 commit 668a47b
Show file tree
Hide file tree
Showing 366 changed files with 9,726 additions and 5,383 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/cleanupnightlyreleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
# This workflow contains a single job called "cleanup"
cleanup:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: windows-latest

# 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@v4
with:
ref: dev
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
ref: dev
- name: Unlist nightly nuget packages
env:
POWERSHELLGALLERY_API_KEY : ${{ secrets.POWERSHELLGALLERY_API_KEY }}
Expand Down
100 changes: 100 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,105 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).


## [Current Nightly]

### Added

- Added support for `WAM` login for Windows OS to support Windows Hello, FIDO keys, Conditional Access policies and other secure authentication modes.
- Added `-SkipCertCreation` parameter in `Register-PnPAzureADApp` cmdlet to prevent creation and uploading of certificates in the Entra ID app.
- Added support to `-ValidateConnection` in managed identity authentication.
- Added `New-PnPSearchExternalConnection`, `Get-PnPSearchExternalConnection`, `Set-PnPSearchExternalConnection` and `Remove-PnPSearchExternalConnection` cmdlets to manage external connections for Microsoft Search [#4231](https://github.com/pnp/powershell/pull/4231)
- Added `Get-PnPSearchExternalSchema` and `Set-PnPSearchExternalSchema` cmdlets to manage the schema for external connections for Microsoft Search [#4231](https://github.com/pnp/powershell/pull/4231)
- Added `OverrideSharingCapability`, `RequestFilesLinkExpirationInDays` & `RequestFilesLinkEnabled` parameters to `Set-PnPTenantSite` cmdlet.

### Changed

- Added output for clientid/Entra App Id when using `-Verbose` with `Connect-PnPOnline`
- Added `-OutputTask` switch to `Add-PnPPlannerTask` cmdlet which will return the just created task so inspect its ID, ETag, etc. values.
- Improved `Invoke-PnPGraphMethod` cmdlet now to also support a hashtable value for the AdditionalHeaders parameter besides the current Dictionary<string,string>. See documentation.
- Improved managed identity authentication for connecting to different M365 services.
- Improved error message for `Export-PnPPage` cmdlet when the page doesn't exist.
- Improved `Register-PnPEntraIDApp` & `Register-PnPEntraIDAppForInteractiveLogin` cmdlets to better work in non-commercial cloud environments.
- Improved `Get-PnPDiagnostics` cmdlet to properly handle a scenrio where there's no correlationId.

### Fixed

- Removed version check dependency on version.txt located in Github repo. Use metadata from powershellgallery.com instead.
- Fix issue with `Get-PnPDiagnostics` cmdlet not working correctly if `CorrelationId` is null.
- Fix issue with App-only authentication not properly fetching tokens.
- Fix issue with Power Platform cmdlets not working correctly in non-commercial cloud environments.
- Fix issue with `Get-PnPFlow` not working correctly when `-AsAdmin` parameter is specified due to API changes. [#4244](https://github.com/pnp/powershell/pull/4244)
- Fix `Connect-PnPOnline` not returning correct `ClientId` in the connection object.

### Removed

### Contributors

- Erwin van Hunen [erwinvanhunen]
- Giacomo Pozzoni [jackpoz]
- Nishkalank Bezawada [NishkalankBezawada]
- Reshmee Auckloo [reshmee011]
- Koen Zomers [koenzomers]

## [2.10.0]

### Added

- Added Register-PnPEntraIdAppForInteractiveLogin cmdlet

### Fixed

### Removed

### Contributors

- Erwin van Hunen [erwinvanhunen]

## [2.9.0]

### Fixed
Fixed app registration on Windows

### Contributors

- Erwin van Hunen [erwinvanhunen]

## [2.8.0]

### Added
- Added in depth verbose logging to all cmdlets which is revealed by adding `-Verbose` to the cmdlet execution [#4023](https://github.com/pnp/powershell/pull/4023)
- Added `-CoreDefaultShareLinkScope` and `-CoreDefaultShareLinkRole` parameters to `Set-PnPTenant` cmdlet. [#4067](https://github.com/pnp/powershell/pull/4067)
- Added `-Identity` parameter to the `Get-PnPFileSharingLink` cmdlet allowing for the retrieval of sharing links based on the file's unique identifier, file instance, listitem instance, or server relative path and supporting retrieval of sharing links for multiple files, such as all in a document library [#4093](https://github.com/pnp/powershell/pull/4093)
- Added `Remove-PnPAzureADUser` which allows removal of a user from Azure Active Directory / Entra ID [#4123](https://github.com/pnp/powershell/pull/4123)
- Added support for `GuestSharingGroupAllowListInTenantByPrincipalIdentity` and `OneDriveSharingCapability` parameters in `Set-PnPTenant` cmdlet. [#4122](https://github.com/pnp/powershell/pull/4122)
- Added `-AsListItem` paramter to `Get-PnPFolder` cmdlet to return as folder as a list item object. [#4151](https://github.com/pnp/powershell/pull/4151)
- Added support for handling `$ErrorActionPreference` global variable to make it work with PnP PowerShell cmdlets. [#4079](https://github.com/pnp/powershell/pull/4079)
- Added `-Folder` parameter to `Add-PnPDocumentSet` cmdlet to allow creation of document sets in a specific folder instead of the list root folder. [#4029](https://github.com/pnp/powershell/pull/4029)

### Fixed
- `Get-PnPTeamsChannel` and `Get-PnPTeamsPrimaryChannel` returning `unknownFutureValue` as MembershipType instead of `shared` [#4054](https://github.com/pnp/powershell/pull/4054)
- Fixed using a AzureADUserPipeBind with `New-PnPAzureADUserTemporaryAccessPass`, `Get-PnPAvailableSensitivityLabel` and `Set-PnPSearchExternalItem` to not work when passing in the User ID GUID [#4123](https://github.com/pnp/powershell/pull/4123)
- Fixed issue with `Get-PnPWebHeader` cmdlet not working properly in Group connected SharePoint sites. [#4147](https://github.com/pnp/powershell/pull/4147)
- Fixed issue with `Get-PnPTeamsChannelFilesFolder` cmdlet to work properly for channels having data more than 2 GB. [#4127](https://github.com/pnp/powershell/pull/4127)

### Changed
- Fixed `Update-PnPTeamsUser` cmdlet to throw a better error message when after a user is removed from a Team but is still in the connected M365 group, for the few seconds that the 2 are out of sync. [#4068](https://github.com/pnp/powershell/pull/4068)
- Changed `-FileUrl` on `Get-PnPFileSharingLink` to become obsolete. Please switch to using `-Identity` instead, passing in the same value [#4093](https://github.com/pnp/powershell/pull/4093)

### Removed

### Contributors

- Dan Cecil [danielcecil]
- Reshmee Auckloo [reshmee011]
- Giacomo Pozzoni [jackpoz]
- Koen Zomers [koenzomers]

## [2.5.0]

### Added

- Added `New-PnPLibraryFileVersionBatchDeleteJob` and `New-PnPSiteFileVersionBatchDeleteJob` cmdlets to queue a job for deleting the file versions based on age. [#3799](https://github.com/pnp/powershell/pull/3799)
- Added `New-PnPLibraryFileVersionExpirationReportJob` and `New-PnPSiteFileVersionExpirationReportJob` cmdlets to queue a job for generating a file version expiration report for all files in a document library or site. [#3799](https://github.com/pnp/powershell/pull/3799)
- Added `Remove-PnPLibraryFileVersionBatchDeleteJob` and `Remove-PnPSiteFileVersionBatchDeleteJob` cmdlets to cancel the job for deleting file versions based on age. [#3799](https://github.com/pnp/powershell/pull/3799)
Expand All @@ -34,6 +129,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-IncludeSensitivityLabels` parameter to `Get-PnPMicrosoft365Group` cmdlet to retrieve sensitivity labels assigned to M365 Groups. [#3991](https://github.com/pnp/powershell/pull/3991)
- Added `Get-PnPFileSensitivityLabelInfo` cmdlet to retrieve sensitivity label information about a file in a SharePoint site. [#3994](https://github.com/pnp/powershell/pull/3994)
- Added `Get-PnPTenantRestrictedSearchAllowedList` cmdlet to retrieve existing list of URLs in the allowed list. [#3997](https://github.com/pnp/powershell/pull/3997)
- Added `-IsSharePointAddInsDisabled` to the `Set-PnPTenant` cmdlet which allows disabling SharePoint Add-ins [#4032](https://github.com/pnp/powershell/pull/4032)
- Added `-RestrictContentOrgWideSearch`, `-ReadOnlyForUnmanagedDevices` and `-InheritVersionPolicyFromTenant` parameters to `Set-PnPTenantSite` cmdlet. [#4024](https://github.com/pnp/powershell/pull/4024)

### Fixed

Expand All @@ -45,6 +142,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed the dev build process on Mac OS devices. [#3907](https://github.com/pnp/powershell/pull/3907)
- Fixed `Get-PnPContainer` cmdlet to also handle pagination in case of large no. of containers in a tenant. [#3990](https://github.com/pnp/powershell/pull/3990)
- Fixed `New-PnPTeamsTeam` cmdlet to better handle error specifically such as `Conflict (409): Team already exists`. [#3992](https://github.com/pnp/powershell/pull/3992)
- Fixed `Remove-PnPTeamsChannel` issue where it was throwing incorrect exception. [#4036](https://github.com/pnp/powershell/pull/4036)

### Changed
- Renamed `Get-PnPSiteFileVersionExpirationReportJobProgress` to `Get-PnPSiteFileVersionExpirationReportJobStatus` [#3828](https://github.com/pnp/powershell/pull/3828)
Expand All @@ -53,13 +151,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Changed `Set-PnPTenantCdnPolicy` cmdlet to allow PolicyValue parameter to be an empty string or $null, while still being mandatory. [#3937](https://github.com/pnp/powershell/pull/3937)
- Marked `UserVoiceForFeedbackEnabled` as obsolete in `Set-PnPTenant` cmdlet as Microsoft doesn't support this. [#3985](https://github.com/pnp/powershell/pull/3985)
- `Get-PnPTenantSite` cmdlet now returns additional properties like `ArchiveStatus`, `EnableAutoExpirationVersionTrim` and many more. [#3987](https://github.com/pnp/powershell/pull/3987)
- `Add-PnPListFoldersToSiteTemplate` cmdlet now wont export RoleBindings which are `Limited Access`. It caused issues while applying the template. [#3918](https://github.com/pnp/powershell/pull/3918)

### Removed

- Removed `UserVoiceForFeedbackEnabled` property from `Get-PnPTenant` as it is deprecated. [PR](https://github.com/pnp/powershell/commit/190ef864d2e20249658eff93feadf0effb24882d)

### Contributors

- Maxime Hazebroucq [mhazebroucq]
- Paolo Pialorsi [PaoloPia]
- Marc Studer [Studermarc]
- Mark Gort [markgort86]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both (1.x and 2.x) can be installed in the same machine with no conflict.

## Supportability and SLA

This library is open-source and community provided library with active community providing support for it. This is not Microsoft provided module so there's no SLA or direct support for this open-source component from Microsoft. Please report any issues using the [issues list](https://github.com/pnp/powershell/issues).
This library is open-source and community provided library with active community providing support for it. This is not Microsoft provided module so there's no SLA or direct support for this open-source component from Microsoft. For more information about the PnP initiative, check out the official website: [Microsoft 365 & Power Platform Community](https://pnp.github.io).

---
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
Expand Down
14 changes: 12 additions & 2 deletions build/Build-Nightly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ if ($runPublish -eq $true) {
}

$corePath = "$destinationFolder/Core"
$commonPath = "$destinationFolder/Common"
$commonPath = "$destinationFolder/Common"
$coreRuntimePathWin64 = "$destinationFolder/Core/runtimes/win-x64/native"
$coreRuntimePathArm64 = "$destinationFolder/Core/runtimes/win-arm64/native"
$coreRuntimePathx86 = "$destinationFolder/Core/runtimes/win-x86/native"

$assemblyExceptions = @("System.Memory.dll");

Expand All @@ -98,14 +101,21 @@ if ($runPublish -eq $true) {
Write-Host "Creating target folders: $destinationFolder" -ForegroundColor Yellow
New-Item -Path $destinationFolder -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Core" -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Core\runtimes" -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Core\runtimes\win-x64\native" -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Core\runtimes\win-arm64\native" -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Core\runtimes\win-x86\native" -ItemType Directory -Force | Out-Null
New-Item -Path "$destinationFolder\Common" -ItemType Directory -Force | Out-Null

Write-Host "Copying files to $destinationFolder" -ForegroundColor Yellow

$commonFiles = [System.Collections.Generic.Hashset[string]]::new()
Copy-Item -Path "$PSscriptRoot/../resources/*.ps1xml" -Destination "$destinationFolder"
Get-ChildItem -Path "$PSScriptRoot/../src/ALC/bin/Release/net6.0" | Where-Object { $_.Extension -in '.dll', '.pdb' } | Foreach-Object { if (!$assemblyExceptions.Contains($_.Name)) { [void]$commonFiles.Add($_.Name) }; Copy-Item -LiteralPath $_.FullName -Destination $commonPath }
Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows" | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $corePath }
Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows" | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $corePath }
Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-x64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathWin64 }
Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-arm64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathArm64 }
Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-x86/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathx86 }
}
Catch {
Write-Host "Error: Cannot copy files to $destinationFolder. Maybe a PowerShell session is still using the module?"
Expand Down
24 changes: 12 additions & 12 deletions build/Unlist-Nightly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ $ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0

function CleanPackage {
param([string] $Package , [int] $VersionsToKeep, [string] $key)

param([string] $Package)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13
$xml = Invoke-WebRequest -Uri "https://www.powershellgallery.com/api/v2/Search()?`$orderby=Id&`$skip=0&`$top=50&searchTerm='$Package'&targetFramework=''&includePrerelease=true"

$result = [xml] $xml

$entries = $result.feed.entry | Where-Object{$_.properties.Id -eq "PnP.PowerShell"} # There are other packages not owned by us that contain this string.


# There are other packages not owned by us that contain this string.
$entries = $result.feed.entry | Where-Object{$_.properties.Id -eq "PnP.PowerShell"}

$sortedEntries = $entries | Sort-Object -Property @{Expression = {[System.Management.Automation.SemanticVersion]::Parse($_.properties.version)}; Descending=$false} | Where-Object {[System.Management.Automation.SemanticVersion]::Parse($_.properties.version).PreReleaseLabel -eq "nightly"}
$releasedEntries = $entries.Where({[System.Management.Automation.SemanticVersion]::Parse($_.properties.version).PreReleaseLabel -ne "nightly"} );

$releasedEntries = $entries.Where({[System.Management.Automation.SemanticVersion]::Parse($_.properties.version).PreReleaseLabel -ne "nightly"} );
# keep last 10
$entriesToKeep = ($sortedEntries | Select-Object -Last 10) + $releasedEntries

$key = $("$env:POWERSHELLGALLERY_API_KEY")
foreach($entry in $entries)
{
{
if(!$entriesToKeep.Contains($entry))
{
Write-Host "Removing version $($entry.properties.Version)"
Write-host "Entry to be deleted - $($entry.properties.Version)"
nuget delete "package/$($entry.properties.Id)" $entry.properties.Version -ApiKey $key -Source https://www.powershellgallery.com/api/v2 -NonInteractive
}
}
}

$ApiKey = $("$env:POWERSHELLGALLERY_API_KEY")

CleanPackage "PnP.PowerShell" 10 $ApiKey
Write-host "Starting cleanup old nightlies job"
CleanPackage "PnP.PowerShell"
23 changes: 21 additions & 2 deletions documentation/Add-PnPDocumentSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Creates a new document set in a library.
## SYNTAX

```powershell
Add-PnPDocumentSet -List <ListPipeBind> -Name <String> -ContentType <ContentTypePipeBind>
Add-PnPDocumentSet [-List] <ListPipeBind> [-Name] <String> [-ContentType <ContentTypePipeBind>] [-Folder <FolderPipeBind>]
[-Connection <PnPConnection>]
```

Expand All @@ -29,7 +29,12 @@ Allows to add new document set to library.
Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Test"
```

This will add a new document set based upon the 'Test Document Set' content type to a list called 'Documents'. The document set will be named 'Test'
### EXAMPLE 2
```powershell
Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Test" -Folder "Projects/Europe"
```

This will add a new document set based upon the 'Test Document Set' content type to a list called 'Documents'. The document set will be named 'Test' and will be added to the 'Europe' folder which is located in the 'Projects' folder. Folders will be created if needed.

## PARAMETERS

Expand Down Expand Up @@ -61,6 +66,20 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -Folder
The folder in the site/list where the document set needs to be created.
```yaml
Type: FolderPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -List
The name of the list, its ID or an actual list object from where the document set needs to be added
Expand Down
1 change: 1 addition & 0 deletions documentation/Add-PnPListFoldersToSiteTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ A switch parameter to include all folders in the list, or just top level folders
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: Recurse

Required: False
Position: 4
Expand Down
Loading

0 comments on commit 668a47b

Please sign in to comment.