Skip to content

Commit 9be73c3

Browse files
Merge pull request #2546 from pnp/dev
November 2022 Release
2 parents 8fbb9f1 + 61e76cb commit 9be73c3

File tree

575 files changed

+335717
-2077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

575 files changed

+335717
-2077
lines changed

.github/workflows/buildpr.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,20 @@ jobs:
3535
- name: Setup .NET Core
3636
uses: actions/setup-dotnet@v1
3737
with:
38-
dotnet-version: '6.0.x'
38+
dotnet-version: |
39+
6.0.x
40+
7.0.x
3941
- name: Install PnP.Core dependencies
4042
run: dotnet restore
4143
working-directory: pnpcore/src/sdk
4244
- name: Build PnP.Core
4345
run: dotnet build --configuration Debug --no-restore -p:WarningLevel=0
4446
working-directory: pnpcore/src/sdk/PnP.Core
4547
- name: Install PnP.Framework dependencies
46-
run: dotnet restore -p:PnPCoreSdkPath="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\netstandard2.0\PnP.Core.dll" -p:PnPCoreSdkPathNet5="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net5.0\PnP.Core.dll" -p:PnPCoreSdkPathNet6="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net6.0\PnP.Core.dll"
48+
run: dotnet restore -p:PnPCoreSdkPath="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\netstandard2.0\PnP.Core.dll" -p:PnPCoreSdkPathNet5="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net5.0\PnP.Core.dll" -p:PnPCoreSdkPathNet6="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net6.0\PnP.Core.dll" -p:PnPCoreSdkPathNet7="..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net7.0\PnP.Core.dll"
4749
working-directory: pnpframework/src/lib
4850
- name: Build PnP.Framework
49-
run: dotnet build --configuration Debug --no-restore -p:WarningLevel=0 -p:PnPCoreSdkPath="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\netstandard2.0\PnP.Core.dll" -p:PnPCoreSdkPathNet5="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net5.0\PnP.Core.dll" -p:PnPCoreSdkPathNet6="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net6.0\PnP.Core.dll"
51+
run: dotnet build --configuration Debug --no-restore -p:WarningLevel=0 -p:PnPCoreSdkPath="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\netstandard2.0\PnP.Core.dll" -p:PnPCoreSdkPathNet5="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net5.0\PnP.Core.dll" -p:PnPCoreSdkPathNet6="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net6.0\PnP.Core.dll" -p:PnPCoreSdkPathNet7="..\..\..\..\pnpcore\src\sdk\PnP.Core\bin\Debug\net7.0\PnP.Core.dll"
5052
working-directory: pnpframework/src/lib/PnP.Framework
5153
- name: Install PnP.PowerShell dependencies
5254
run: dotnet restore -p:PnPFrameworkPath="..\..\..\pnpframework\src\lib\" -p:PnPCoreSdkPath="..\..\..\pnpcore\src\sdk\"

CHANGELOG.md

Lines changed: 128 additions & 2 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To debug the cmdlets: launch PowerShell and attach Visual Studio to the powershe
2424
Before starting on any new submissions, please ensure your fork is up to date with the upstream repository. This avoids frustration and challenges for us to validate and test your submission. Steps on how to easily keep your fork up to date can be found [on this wiki page](https://github.com/pnp/PnP-PowerShell/wiki/Update-your-fork-with-the-latest-code).
2525

2626
## Code contributions
27-
In order to successfully compile the PnP PowerShell solution you will _also_ have to download *and build in Visual Studio* the [PnP-Framework](https://github.com/pnpframework) repository and make the dev branch available. **The PowerShell solution depends on it**. In order to successfully
27+
In order to successfully compile the PnP PowerShell solution you will _also_ have to download *and build in Visual Studio* the [PnP-Framework](https://github.com/pnp/pnpframework) repository and make the dev branch available. **The PowerShell solution depends on it**. In order to successfully
2828
compile it, make sure that PnP-Sites-Core is located at the same level as PnP-PowerShell and you open the solution file `pnpframework.sln` located in the Core subfolder of the sourcecode.
2929

3030
So:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PnP PowerShell
22

3-
**PnP PowerShell** is a .NET Core 3.1 / .NET Framework 4.6.2 based PowerShell Module providing nearly 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.
3+
**PnP PowerShell** is a .NET Core 3.1 / .NET Framework 4.6.2 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.
44

55
Last version | Last nightly version
66
-------------|---------------------

build/Build-Nightly.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ if ($runPublish -eq $true) {
195195
exit 1
196196
}
197197

198+
# Generate predictor commands
199+
./build/Generate-PredictorCommands.ps1 -Version $version
200+
198201
Write-Host "Generating Documentation" -ForegroundColor Yellow
199202
Set-PSRepository PSGallery -InstallationPolicy Trusted
200203
Install-Module PlatyPS -ErrorAction Stop
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Param(
2+
[Parameter(Mandatory = $true)]
3+
[String]
4+
$Version
5+
)
6+
7+
try {
8+
9+
Write-Host "Generating PnP.PowerShell predictor commands for version $Version" -ForegroundColor Yellow
10+
11+
$json = @();
12+
13+
# get all files in the srcfiles folder
14+
$files = Get-ChildItem -Path ".\documentation" -Filter "*.md" -Recurse;
15+
16+
# set id to 1
17+
$id = 1;
18+
19+
# loop through each file
20+
$files | ForEach-Object {
21+
22+
# get file name without extension
23+
$baseName = $_.BaseName;
24+
25+
# get the file data
26+
$fileData = Get-Content $_.FullName -Raw;
27+
# create a regex pattern to match the example code
28+
$pattern = "(?s)(?<=### EXAMPLE .*``````powershell)(.*?)(?=``````)"
29+
30+
if($baseName -eq "connect-pnponline") {
31+
$pattern = "(?s)(?<=### EXAMPLE .*``````)(.*?)(?=``````)";
32+
}
33+
34+
# ignore case for regex
35+
$options = [Text.RegularExpressions.RegexOptions]'IgnoreCase, CultureInvariant'
36+
37+
$result = [regex]::Matches($fileData, $pattern, $options);
38+
39+
$i = 1;
40+
foreach ($item in $result) {
41+
42+
$value = $item.Value.Trim();
43+
44+
# replace \n with a semicolon
45+
$value = $value.Replace("`n", " ; ");
46+
47+
48+
# if the item value begins with the name of the file then add it to the json
49+
if ($value.ToLower() -match "^$($baseName.ToLower()).*") {
50+
$json += @{
51+
"CommandName" = $baseName
52+
"Command" = $value
53+
"Rank" = $i
54+
"Id" = $id
55+
}
56+
$i++;
57+
$id++;
58+
}
59+
}
60+
61+
}
62+
63+
# check if predictor folder exists in ..\resources folder
64+
if (!(Test-Path -Path ".\resources\predictor")) {
65+
# create the folder
66+
New-Item -ItemType Directory -Path ".\resources\predictor" -Force;
67+
}
68+
69+
# write the json to a file
70+
$json | ConvertTo-Json -Depth 10 | Out-File -FilePath ".\resources\predictor\PnP.PowerShell.Suggestions.$($Version).json" -Encoding UTF8 -Force;
71+
}
72+
catch {
73+
Write-Error $_.Exception.Message;
74+
Write-Error "Error: Cannot generate predictor commands";
75+
exit 1;
76+
}

docker/hub.docker.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# PnP.Powershell
22

3-
## Featured tags
3+
![PnP PowerShell](https://repository-images.githubusercontent.com/296298081/933a6d00-072b-11eb-839d-56df16c29588)
44

5-
### Latest
5+
**PnP PowerShell** is a .NET Core 3.1 / .NET Framework 4.6.2 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.
6+
7+
Last version | Last nightly version
8+
-------------|---------------------
9+
[![PnP.PowerShell](https://img.shields.io/powershellgallery/v/pnp.powershell)](https://www.powershellgallery.com/packages/PnP.PowerShell/) | [![PnP.PowerShell](https://img.shields.io/powershellgallery/v/pnp.powershell?include_prereleases)](https://www.powershellgallery.com/packages/PnP.PowerShell/)
10+
11+
## Latest
612

713
* latest: The latest stable image
814

@@ -18,29 +24,29 @@
1824

1925
## About this image
2026

21-
**PnP PowerShell** is a .NET Core 3.1 / .NET Framework 4.6.1 based PowerShell Module providing over 600 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.
27+
**PnP PowerShell** is a .NET Core 3.1/ .NET Framework 4.6.2 based PowerShell Module providing over 600 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.
2228

2329
## Usage examples
2430

2531
### Windows-container
2632

2733
Starting an isolated container with PnP.PowerShell module installed:
2834

29-
```
30-
docker run --rm -it m365pnp/powershell:1.10.0-nanoserver-1809
35+
```powershell
36+
docker run --rm -it m365pnp/powershell:1.11.0-nanoserver-1809
3137
```
3238

3339
Starting a PnP.PowerShell container with the current directory mounted:
3440

35-
```PowerShell
36-
docker run --rm -it -v ${PWD}:c:/app -w c:/app m365pnp/powershell:1.10.0-nanoserver-1809
41+
```powerShell
42+
docker run --rm -it -v ${PWD}:c:/app -w c:/app m365pnp/powershell:1.11.0-nanoserver-1809
3743
```
3844

3945
### Linux-container
4046

4147
Starting an isolated container with PnP.PowerShell module installed:
4248

43-
```
49+
```powershell
4450
docker run --rm -it m365pnp/powershell
4551
```
4652

@@ -69,9 +75,23 @@ Tag name examples:
6975
* 1.10.0-nanoserver-1809
7076
* 1.10.0-alpine-3.14
7177
* 1.10.26-nightly-nanoserver-ltsc2022
78+
* 1.11.0-alpine-3.14
79+
* 1.11.0-nanoserver-ltsc2022
80+
81+
To find the version numbers please visit <https://www.powershellgallery.com/packages/PnP.PowerShell>
82+
83+
## Contribute
84+
85+
We love to accept contributions.
86+
87+
If you want to get involved with helping us grow PnP PowerShell, whether that is suggesting or adding a new cmdlet, extending an existing cmdlet or updating our documentation, we would love to hear from you.
88+
89+
Checkout our [Wiki](https://pnp.github.io/powershell/articles/buildingsource.html) for guides on how to contribute to this project.
90+
91+
## Microsoft 365 Platform Community
7292

73-
To find the version numbers please visit https://www.powershellgallery.com/packages/PnP.PowerShell
93+
PnP PowerShell is a [Microsoft 365 Platform Community](https://pnp.github.io) (PnP) project. Microsoft 365 Platform Community is a virtual team consisting of Microsoft employees and community members focused on helping the community make the best use of Microsoft products. PnP PowerShell is an open-source project not affiliated with Microsoft and not covered by Microsoft support. If you experience any issues using PnP PowerShell, please submit an issue or open a discussion in the [issues list or discussion forum](https://github.com/pnp/powershell/issues/new/choose).
7494

75-
## Feedback
95+
## Disclaimer
7696

77-
* To give feedback for PnP.PowerShell or for how the images are built, file an issue at [PnP/PowerShell](https://github.com/pnp/powershell/issues/new/choose)
97+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

documentation/Add-PnPAlert.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Adds an alert for a user to a list
1717
```powershell
1818
Add-PnPAlert [-List] <ListPipeBind> [-Title <String>] [-User <UserPipeBind>]
1919
[-DeliveryMethod <AlertDeliveryChannel>] [-ChangeType <AlertEventType>] [-Frequency <AlertFrequency>]
20-
[-Filter <AlertFilter>] [-Time <DateTime>] [-Connection <PnPConnection>]
20+
[-Filter <AlertFilter>] [-Time <DateTime>] [-AlertTemplateName <string>] [-Connection <PnPConnection>]
2121
[<CommonParameters>]
2222
```
2323

@@ -179,7 +179,19 @@ Accept pipeline input: False
179179
Accept wildcard characters: False
180180
```
181181
182+
### -AlertTemplateName
183+
To define a particular alert template. Refer this [link](https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb802738(v=office.14)) to specify the template value name.
182184
185+
```yaml
186+
Type: string
187+
Parameter Sets: (All)
188+
189+
Required: False
190+
Position: Named
191+
Default value: None
192+
Accept pipeline input: False
193+
Accept wildcard characters: False
194+
```
183195
184196
## RELATED LINKS
185197

documentation/Add-PnPApp.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,23 @@ Add-PnPApp [-Path] <String> [-Scope <AppCatalogScope>] [-Overwrite] [-Timeout <I
2121

2222
## DESCRIPTION
2323

24+
Allows to upload an app to the app catalog at tenant or site collection level. By specifying `-Publish` option it is possible to deploy/trust it at the same time.
25+
2426
## EXAMPLES
2527

2628
### EXAMPLE 1
2729
```powershell
2830
Add-PnPApp -Path ./myapp.sppkg
2931
```
3032

31-
This will upload the specified app package to the app catalog
33+
This will upload the specified app package to the tenant app catalog
3234

3335
### EXAMPLE 2
3436
```powershell
3537
Add-PnPApp -Path ./myapp.sppkg -Publish
3638
```
3739

38-
This will upload the specified app package to the app catalog and deploy/trust it at the same time.
40+
This will upload the specified app package to the tenant app catalog and deploy/trust it at the same time.
3941

4042
### EXAMPLE 3
4143
```powershell
@@ -44,6 +46,13 @@ Add-PnPApp -Path ./myapp.sppkg -Scope Site -Publish
4446

4547
This will upload the specified app package to the site collection app catalog and deploy/trust it at the same time.
4648

49+
### EXAMPLE 4
50+
```powershell
51+
Add-PnPApp -Path ./myapp.sppkg -Publish -SkipFeatureDeployment
52+
```
53+
54+
This will upload the specified app package to the tenant app catalog, deploy/trust it and make it globally available on all site collections.
55+
4756
## PARAMETERS
4857

4958
### -Connection
@@ -60,7 +69,7 @@ Accept wildcard characters: False
6069
```
6170
6271
### -Overwrite
63-
Overwrites the existing app package if it already exists
72+
When provided, it will overwrite the existing app package if it already exists
6473
6574
```yaml
6675
Type: SwitchParameter
@@ -73,7 +82,7 @@ Accept wildcard characters: False
7382
```
7483
7584
### -Path
76-
Specifies the Id or an actual app metadata instance
85+
The path to the app package to deploy to the App Catalog
7786
7887
```yaml
7988
Type: String
@@ -86,7 +95,7 @@ Accept wildcard characters: False
8695
```
8796
8897
### -Publish
89-
This will deploy/trust an app into the app catalog
98+
This will deploy/trust an app into the App Catalog
9099
91100
```yaml
92101
Type: SwitchParameter
@@ -99,7 +108,7 @@ Accept wildcard characters: False
99108
```
100109
101110
### -Scope
102-
Defines which app catalog to use. Defaults to Tenant
111+
Defines which app catalog to use: the site collection scoped App Catalog or the tenant wide App Catalog. Defaults to Tenant.
103112
104113
```yaml
105114
Type: AppCatalogScope
@@ -113,6 +122,7 @@ Accept wildcard characters: False
113122
```
114123
115124
### -SkipFeatureDeployment
125+
When provided, the solution will be globally deployed, meaning one does not have to go into every site to add it as an app to have its components available. Instead they will be available rightaway.
116126
117127
```yaml
118128
Type: SwitchParameter
@@ -140,5 +150,3 @@ Accept wildcard characters: False
140150
## RELATED LINKS
141151
142152
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
143-
144-

documentation/Add-PnPAvailableSiteClassification.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Add-PnPAvailableSiteClassification -Classifications <System.Collections.Generic.
2525

2626
## DESCRIPTION
2727

28+
Allows to add classic site classification values
29+
2830
## EXAMPLES
2931

3032
### EXAMPLE 1

0 commit comments

Comments
 (0)