Skip to content

Commit 0050811

Browse files
Merge pull request #767 from pnp/dev
Release 1.6.0
2 parents fc683c8 + 71230ee commit 0050811

File tree

90 files changed

+1081
-444
lines changed

Some content is hidden

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

90 files changed

+1081
-444
lines changed

.github/workflows/closestaleissues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ jobs:
1313
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days'
1414
days-before-stale: 14
1515
days-before-close: 5
16+
exempt-issue-labels: 'enhancement'
1617
stale-issue-label: 'no-issue-activity'

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ All notable changes to this project will be documented in this file.
55

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

8-
## [Current Nightly]
8+
## [1.6.0]
99

1010
### Added
1111

12+
### Changed
13+
14+
- Get-PnPPage now can load pages living in a folder by specifying "folder/page.aspx"
15+
- Added `-DisableBackToClassic` option to Set-PnPTenant
16+
17+
### Contributors
18+
- [thomassmart]
19+
- Bert Jansen [jansenbe]
20+
1221
## [1.5.0]
1322

1423
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Last version | Last nightly version
66
-------------|---------------------
77
[![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/)
88

9-
This module is a successor of the [PnP-PowerShell](https://github.com/pnp/pnp-powershell) module. The original cmdlets only work on Windows and Windows PowerShell and supports SharePoint On-Premises (2013, 2016 and 2019) and SharePoint Online. This version of the cmdlets is cross-platform (e.g. it works on Windows, MacOS and Linux) however will only support SharePoint Online. Going forward will only be **actively maintaining the cross-platform PnP PowerShell** module.
9+
This module is a successor of the [PnP-PowerShell](https://github.com/pnp/pnp-powershell) module. The original cmdlets only work on Windows and Windows PowerShell and supports SharePoint On-Premises (2013, 2016 and 2019) and SharePoint Online. This version of the cmdlets is cross-platform (e.g. it works on Windows, MacOS and Linux) however will only support SharePoint Online. Going forward we will only be **actively maintaining the cross-platform PnP PowerShell** module.
1010

1111
For more information about installing or upgrading to this module, please refer to the documentation at https://pnp.github.io/powershell/articles/index.html
1212

documentation/Add-PnPContentType.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ Add-PnPContentType -Name "Project Document" -Description "Use for Contoso projec
3030

3131
This will add a new content type based on the parent content type stored in the $ct variable.
3232

33+
### EXAMPLE 2
34+
```powershell
35+
Add-PnPContentType -Name "Project Document" -Description "Use for Contoso projects" -Group "Contoso Content Types" -ParentContentType (Get-PnPContentType -Identity 0x0101) -DocumentTemplate "/_cts/Project Document/template.docx"
36+
```
37+
38+
This will add a new content type based on the standard document content type and assigns the document template template.docx to it
39+
3340
## PARAMETERS
3441

3542
### -Connection
@@ -116,7 +123,19 @@ Accept pipeline input: False
116123
Accept wildcard characters: False
117124
```
118125
126+
### -DocumentTemplate
127+
Allows providing a server relative path to a file which should be used as the document template for this content type
128+
129+
```yaml
130+
Type: String
131+
Parameter Sets: (All)
119132

133+
Required: False
134+
Position: Named
135+
Default value: None
136+
Accept pipeline input: False
137+
Accept wildcard characters: False
138+
```
120139
121140
## RELATED LINKS
122141
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
Module Name: PnP.PowerShell
3+
schema: 2.0.0
4+
applicable: SharePoint Online
5+
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPContentTypesFromContentTypeHub.html
6+
external help file: PnP.PowerShell.dll-Help.xml
7+
title: Add-PnPContentTypesFromContentTypeHub
8+
---
9+
10+
# Add-PnPContentTypesFromContentTypeHub
11+
12+
## SYNOPSIS
13+
14+
**Required Permissions**
15+
16+
* ManageLists permission on the current site or the content type hub site.
17+
18+
Adds published content types from content type hub site to current site. If the content type already exists on the current site then the latest published version of the content type will be synced to the site.
19+
20+
## SYNTAX
21+
22+
```powershell
23+
Add-PnPContentTypesFromContentTypeHub -ContentTypes List<String>
24+
[-Connection <PnPConnection>] [<CommonParameters>]
25+
```
26+
27+
## DESCRIPTION
28+
29+
## EXAMPLES
30+
31+
### EXAMPLE 1
32+
```powershell
33+
$list = New-Object Collections.Generic.List[string]
34+
$list.Add('0x0101')
35+
$list.Add('0x01')
36+
Add-PnPContentTypesFromContentTypeHub -ContentTypes $list
37+
```
38+
39+
This will add the content types with the ids '0x0101' and '0x01' to the current site. Latest published version of these content types will be synced if they were already present in the current site.
40+
41+
## PARAMETERS
42+
43+
### -Connection
44+
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
45+
46+
```yaml
47+
Type: PnPConnection
48+
Parameter Sets: (All)
49+
50+
Required: False
51+
Position: Named
52+
Default value: None
53+
Accept pipeline input: False
54+
Accept wildcard characters: False
55+
```
56+
57+
### -ContentTypes
58+
The list of content type ids present in content type hub site that are required to be added/synced to the current site.
59+
60+
```yaml
61+
Type: List<String>
62+
Parameter Sets: (All)
63+
64+
Required: True
65+
Position: Named
66+
Default value: None
67+
Accept pipeline input: False
68+
Accept wildcard characters: False
69+
```
70+
## RELATED LINKS
71+
72+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
73+
74+

documentation/Clear-PnpRecycleBinItem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Module Name: PnP.PowerShell
33
schema: 2.0.0
44
applicable: SharePoint Online
5-
online version: https://pnp.github.io/powershell/cmdlets/Clear-PnpRecycleBinItem.html
5+
online version: https://pnp.github.io/powershell/cmdlets/Clear-PnPRecycleBinItem.html
66
external help file: PnP.PowerShell.dll-Help.xml
77
title: Clear-PnPRecycleBinItem
88
---
@@ -39,14 +39,14 @@ Permanently deletes all the items in the first and second stage recycle bins of
3939

4040
### EXAMPLE 2
4141
```powershell
42-
Clear-PnpRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442
42+
Clear-PnPRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442
4343
```
4444

4545
Permanently deletes the recycle bin item with Id 72e4d749-d750-4989-b727-523d6726e442 from the recycle bin
4646

4747
### EXAMPLE 3
4848
```powershell
49-
Clear-PnpRecycleBinItem -Identity $item -Force
49+
Clear-PnPRecycleBinItem -Identity $item -Force
5050
```
5151

5252
Permanently deletes the recycle bin item stored under variable $item from the recycle bin without asking for confirmation from the end user first

documentation/Connect-PnPOnline.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PnP.PowerShell.dll-Help.xml
33
Module Name: PnP.PowerShell
4-
online version: https://pnp.github.io/powershell/cmdlets/connect-pnponline.html
4+
online version: https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html
55
schema: 2.0.0
66
---
77

@@ -175,8 +175,7 @@ By default it will use the PnP Management Shell multi-tenant application behind
175175
Connect-PnPOnline -Url "https://portal.contoso.com" -TransformationOnPrem -CurrentCredential
176176
```
177177

178-
Connects to on-premises SharePoint 2013, 2016 or 2019 site with the current user's on-premises Windows credential (e.g.
179-
domain\user).
178+
Connects to on-premises SharePoint 2013, 2016 or 2019 site with the current user's on-premises Windows credential (e.g. domain\user).
180179
This option is only supported for being able to transform on-premises classic wiki, webpart, blog and publishing pages into modern pages in a SharePoint Online site.
181180
Although other PnP cmdlets might work as well, they're officially not supported for being used in an on-premises context.
182181
See http://aka.ms/sharepoint/modernization/pages for more details on page transformation.
@@ -338,6 +337,22 @@ Accept pipeline input: False
338337
Accept wildcard characters: False
339338
```
340339
340+
### -CurrentCredentials
341+
Use credentials of the currently logged in user. Applicable exclusively when connecting to on premises SharePoint Server via PnP.
342+
Switch parameter.
343+
344+
```yaml
345+
Type: CredentialPipeBind
346+
Parameter Sets: Credentials
347+
Aliases:
348+
349+
Required: False
350+
Position: Named
351+
Default value: None
352+
Accept pipeline input: False
353+
Accept wildcard characters: False
354+
```
355+
341356
### -DriveName
342357
Name of the PSDrive to create (default: SPO)
343358
@@ -605,4 +620,4 @@ Accept wildcard characters: False
605620
606621
## RELATED LINKS
607622
608-
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
623+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

documentation/Copy-PnPFile.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Copies a file or folder to a different location. This location can be within the
1515
## SYNTAX
1616

1717
```powershell
18-
Copy-PnPFile [-SourceUrl] <String> [-TargetUrl] <String> [-OverwriteIfAlreadyExists] [-Force] [-IgnoreVersionHistory] [-NoWait] [-Connection <PnPConnection>]
18+
Copy-PnPFile [-SourceUrl] <String> [-TargetUrl] <String> [-Overwrite] [-Force] [-IgnoreVersionHistory] [-NoWait] [-Connection <PnPConnection>]
1919
[<CommonParameters>]
2020
```
2121

@@ -25,10 +25,10 @@ Copy-PnPFile [-SourceUrl] <String> [-TargetUrl] <String> [-OverwriteIfAlreadyExi
2525

2626
### EXAMPLE 1
2727
```powershell
28-
Copy-PnPFile -SourceUrl "Shared Documents/MyProjectfiles" -TargetUrl "/sites/otherproject/Shared Documents" -OverwriteIfAlreadyExists
28+
Copy-PnPFile -SourceUrl "Shared Documents/MyProjectfiles" -TargetUrl "/sites/otherproject/Shared Documents" -Overwrite
2929
```
3030

31-
Copies a folder named MyDocs in the document library called Documents located in the current site to the root folder of the library named Documents in the site collection otherproject.
31+
Copies a folder named MyProjectFiles in the document library called Documents located in the current site to the root folder of the library named Documents in the site collection otherproject. If a folder named MyProjectFiles already exists, it will overwrite it.
3232

3333
### EXAMPLE 2
3434
```powershell
@@ -39,10 +39,10 @@ Copies a file named company.docx located in a document library called Shared Doc
3939

4040
### EXAMPLE 3
4141
```powershell
42-
Copy-PnPFile -SourceUrl "Shared Documents/company.docx" -TargetUrl "/sites/otherproject/Shared Documents"
42+
Copy-PnPFile -SourceUrl "Shared Documents/company.docx" -TargetUrl "/sites/otherproject/Shared Documents" -IgnoreVersionHistory
4343
```
4444

45-
Copies a file named company.docx located in a document library called Documents in the current site to the site collection otherproject. If a file named company.docx already exists, it won't perform the copy.
45+
Copies a file named company.docx located in a document library called Documents in the current site to the site collection otherproject. If a file named company.docx already exists, it won't perform the copy. Only the latest version of the file will be copied and its history will be discarded.
4646

4747
### EXAMPLE 4
4848
```powershell
@@ -70,7 +70,7 @@ Copies a file named company.docx located in a document library called Documents
7070
Copy-PnPFile -SourceUrl "Shared DocuDocuments/company.docx" -TargetUrl "Subsite/Shared Documents"
7171
```
7272

73-
Copies a file named company.docx located in a document library called Documents to the document library named Document in a subsite named Subsite keeping the file name.
73+
Copies a file named company.docx located in a document library called Documents to the document library named Documents in a subsite named Subsite keeping the file name.
7474

7575
### EXAMPLE 8
7676
```powershell
@@ -122,7 +122,7 @@ Accept wildcard characters: False
122122
```
123123
124124
### -IgnoreVersionHistory
125-
If provided, only the latest version of the document will be copied and its history will be discared. If not provided, all historical versions will be copied along.
125+
If provided, only the latest version of the document will be copied and its history will be discarded. If not provided, all historical versions will be copied.
126126
127127
```yaml
128128
Type: SwitchParameter

documentation/Disable-PnPFlow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ schema: 2.0.0
88
# Disable-PnPFlow
99

1010
## SYNOPSIS
11+
12+
**Required Permissions**
13+
14+
* Azure: management.azure.com
15+
1116
Disables a specific flow
1217

1318
## SYNTAX

documentation/Enable-PnPFlow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ schema: 2.0.0
88
# Enable-PnPFlow
99

1010
## SYNOPSIS
11+
12+
**Required Permissions**
13+
14+
* Azure: management.azure.com
15+
1116
Enables a specific flow
1217

1318
## SYNTAX

0 commit comments

Comments
 (0)