Skip to content

Commit 8562dee

Browse files
Merge pull request #1612 from pnp/dev
Intermediate master branch update for documentation reasons
2 parents 78862a9 + 6367cc3 commit 8562dee

File tree

177 files changed

+4435
-2256
lines changed

Some content is hidden

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

177 files changed

+4435
-2256
lines changed

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,80 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
77

88
## [Current Nightly]
99

10+
### Added
11+
12+
- Added additional properties to the users returned by `Get-PnPMicrosoft365GroupMember` such as `userType` [#1474](https://github.com/pnp/powershell/pull/1474)
13+
- Added `Update-PnPTeamsUser` cmdlet to change the role of a user in an existing Teams team [#1499](https://github.com/pnp/powershell/pull/1499)
14+
- Added `Get\New\Remove\Set-PnPMicrosoft365GroupSettings` cmdlets to interact with Microsoft 365 Group settings.
15+
- Added `Get-PnPMicrosoft365GroupSettingTemplates` cmdlet to retrieve system wide Microsoft 365 Group setting templates.
16+
- Added `Add\Remove\Invoke\Get-PnPListDesign` cmdlets to add a list design, remove a list design and apply the list design.
17+
- Added `DisablePersonalListCreation` parameter to `Set-PnPTenant` cmdlet to provide ability to disable personal lists creation [#1545](https://github.com/pnp/powershell/pull/1545)
18+
- Added `DisabledModernListTemplateIds` and `EnableModernListTemplateIds` parameters to `Set-PnPTenant` cmdlet to provide ability to disable or enable modern lists with specific Ids [#1545](https://github.com/pnp/powershell/pull/1545)
19+
- Added `DisablePersonalListCreation` and `DisabledModernListTemplateIds` values to be displayed when using `Get-PnPTenant` cmdlet [#1545](https://github.com/pnp/powershell/pull/1545)
20+
- Added `Add\Remove\Set-PnPAdaptiveScopeProperty` cmdlets to add/update/remove a property bag value while dealing with the noscript toggling in one cmdlet [#1556](https://github.com/pnp/powershell/pull/1556)
21+
- Added support to add multiple owners and members in `New-PnPTeamsTeam` cmdlet [#1241](https://github.com/pnp/powershell/pull/1241)
22+
- Added the ability to set the title of a new modern page in SharePoint Online using `Add-PnPPage` to be different from its filename by using `-Title`
23+
- Added optional `-UseBeta` parameter to `Get-PnPAzureADUser` to force it to use the Microsoft Graph beta endpoint. This can be necessary when i.e. using `-Select "PreferredDataLocation"` to query for users with a specific multi geo location as this property is only available through the beta endpoint. [#1559](https://github.com/pnp/powershell/pull/1559)
24+
- Added `-Content` option to `Add-PnPFile` which allows creating a new file on SharePoint Online and directly providing its textual content, i.e. to upload a log file of the execution [#1559](https://github.com/pnp/powershell/pull/1559)
25+
- Added `Get-PnPTeamsPrimaryChannel` to get the primary Teams channel, general, of a Team [#1572](https://github.com/pnp/powershell/pull/1572)
26+
- Added `Publish\Unpublish-PnPContentType` to allow for content types to be published or unpublished on hub sites [#1597](https://github.com/pnp/powershell/pull/1597)
27+
- Added `Get-PnPContentTypePublishingStatus` to get te current publication state of a content type in the content type hub site [#1597](https://github.com/pnp/powershell/pull/1597)
28+
- Added ability to pipe the output of `Get-PnPTenantDeletedSite` to either `Restore-PnPTenantDeletedSite` or `Remove-PnPTenantDeletedSite` [#1596](https://github.com/pnp/powershell/pull/1596)
29+
- Added `Rename-PnPTenantSite` to rename a SharePoint Online site URL [#1606](https://github.com/pnp/powershell/pull/1606)
30+
31+
### Changed
32+
33+
- Improved `Add-PnPTeamsUser` cmdlet. The cmdlet executes faster and we can now add users in batches of 200. [#1548](https://github.com/pnp/powershell/pull/1548)
34+
- The `Move\Remove\Rename-PnPFolder` cmdlets now support pipebinds.
35+
- Changed `Add-PnPDataRowsToSiteTemplate`, it will return a warning if user(s) are not found during list item extraction. Earlier it used to throw error and stop extraction of list items.
36+
- Changed the return type of `Sync-PnPSharePointUserProfilesFromAzureActiveDirectory` to return our own entity instead of the one returned by CSOM [#1559](https://github.com/pnp/powershell/pull/1559)
37+
- Changed running `Sync-PnPSharePointUserProfilesFromAzureActiveDirectory` with `-WhatIf` to also provide a return entity providing the path to where the JSON file has been uploaded to [#1559](https://github.com/pnp/powershell/pull/1559)
38+
- Disabling telemetry collection now requires either setting the environment variable or creating the telemetry file ([documentation](https://pnp.github.io/powershell/articles/configuration.html)) [#1504](https://github.com/pnp/powershell/pull/1504)
39+
- Changed `Get-PnPAzureADUser` to now return all the users in Azure Active Directory by default, instead of only the first 999, unless you specified `-EndIndex:$null` [#1565](https://github.com/pnp/powershell/pull/1565)
40+
- Changed `Get-PnPTenantDeletedSite -Identity` no longer returning an unknown exception when no site collection with the provided Url exists in the tenant recycle bin but instead returning no output to align with other cmdlets [#1596](https://github.com/pnp/powershell/pull/1596)
41+
42+
### Fixed
43+
44+
- Fixed `Set-PnPSite` not working with `DisableCompanyWideSharingLinks` parameter.
45+
- Fixed `Get-PnPListPermissions` returning wrong information in case of broken inheritance.
46+
- Fixed `Submit-PnPSearchQuery -Query "somequery"` yielding an error when no results [#1520](https://github.com/pnp/powershell/pull/1520)
47+
- Fixed `Set-PnPTenantSite` not setting SharingCapability property correctly.
48+
- Fixed `Get-PnPMicrosoft365Group` retrieving non-Unified groups when parameters are not specified.
49+
- Fixed `Get-PnPRecycleBinListItem` not retrieving second stage items if only `RowLimit` is specified.
50+
- Fixed `Add-PnPDataRowsToSiteTemplate` issue with PnP templates when it contained multilingual references.
51+
- Fixed `Copy-PnPItemProxy` is not recognized as the name of a cmdlet, function, script file, or operable program error with the cmdlet.
52+
- Fixed `Add-PnPMicrosoft365GroupMember`, `Remove-PnPMicrosoft365GroupMember`, `Add-PnPTeamsUser` and `Remove-PnPTeamsUser` not being able to handle guest accounts containing # characters [#1523](https://github.com/pnp/powershell/pull/1523)
53+
- Fixed not being able to pipe `Get-PnPHubSite` to `Get-PnPHubSiteChild` to retrieve all site collections which are associated to any hub site [#1571](https://github.com/pnp/powershell/pull/1571)
54+
- Fixed `Add-PnPFileToSiteTemplate` when used alongside `Get-PnPFile` where the FileStream tried to overwrite an already open filestream when a file was located in the same directory as the template file itself.
55+
- Fixed `Get-PnPMessageCenterAnnouncement` returning an error [#1607](https://github.com/pnp/powershell/pull/1607)
56+
- Fixed `New-PnPTeamsTeam` issue when adding Owners and Members.
57+
- Fixed running an admin cmdlet not always returning to the same context as before running the cmdlet [#1611](https://github.com/pnp/powershell/pull/1611)
58+
59+
### Removed
60+
61+
- Removed `Add-PnPClientSidePageSection`, use `Add-PnPPageSection` instead [#1563](https://github.com/pnp/powershell/pull/1563)
62+
- Removed `Add-PnPClientSideWebPart`, use `Add-PnPPageWebPart` instead [#1563](https://github.com/pnp/powershell/pull/1563)
63+
- Removed `Add-PnPClientSideText`, use `Add-PnPPageTextPart` instead [#1563](https://github.com/pnp/powershell/pull/1563)
64+
- Removed `Get-PnPAADUser`, use `Get-PnPAzureADUser` instead [#1568](https://github.com/pnp/powershell/pull/1568)
65+
- Removed `Get-PnPOffice365CurrentServiceStatus`, `Get-PnPOffice365HistoricalServiceStatus`, `Get-PnPOffice365ServiceMessage` and `Get-PnPOffice365Services` as Microsoft has removed the underlying Office Management APIs. Use `Get-PnPMessageCenterAnnouncent`, `Get-PnPServiceCurrentHealth` and `Get-PnPServiceHealthIssue` instead. [#1608](https://github.com/pnp/powershell/pull/1608)
66+
67+
### Contributors
68+
69+
- Swapnil Shrivastava [swapnil1993]
70+
- Hugo Bernier [hugoabernier]
71+
- brenle
72+
- Johan Brännmar [brannmar]
73+
- Lschockaert
74+
- Leon Armston [LeonArmston]
75+
- Reshmee Auckloo [reshmee011]
76+
- Arleta [PowershellScripts]
77+
- Brendon Lee [brenle]
78+
- Guillaume Bordier [gbordier]
79+
- [reusto]
80+
- Reshmee Auckloo [reshmee011]
81+
- Gautam Sheth [gautamdsheth]
82+
- Koen Zomers [koenzomers]
83+
1084
## [1.9.0]
1185

1286
### Added
@@ -45,6 +119,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
45119
- Added `-IsFluidEnabled` to `Set-PnPTenant` cmdlet to enable/disable users from using Fluid components.
46120
- Added `Add\Get\Remove-PnPListItemComment` cmdlets to deal with list item comments. Using these cmdlets, you will now be able to add, retrieve and delete list item comments. [#1462](https://github.com/pnp/powershell/pull/1462)
47121
- Added `-ResourceTypeName` and `-ResourceUrl` parameters to `Get-PnPAccessToken` to fetch access token of specified resource. [#1451](https://github.com/pnp/powershell/pull/1451)
122+
- Added `-BookmarkStatus` parameter to `Get-PnPSearchConfiguration` cmdlet to call REST endpoint to fetch promoted results defined via query rules and output them in Bookmark supported CSV format.
48123

49124
### Changed
50125
- Improved `Get-PnPFile` cmdlet to handle large file downloads
@@ -82,6 +157,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
82157
- Removed `Get-PnPSubWebs` as that was marked deprecated a year ago. Use `Get-PnPSubWeb` instead. [#1394](https://github.com/pnp/powershell/pull/1394)
83158

84159
### Contributors
160+
- Mikael Svenson [wobba]
85161
- Koen Zomers [koenzomers]
86162
- Bert Jansen [jansenbe]
87163
- Gautam Sheth [gautamdsheth]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# PnP PowerShell
22

3-
**PnP PowerShell** is a .NET Core 3.1 / .NET Framework 4.6.1 based PowerShell Module providing over 500 cmdlets that work with Microsoft 365 environments and more specifically SharePoint Online and Microsoft Teams.
3+
**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 and more specifically SharePoint Online and Microsoft Teams.
44

55
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 we 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 (i.e it works on Windows, MacOS and Linux) but it 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

build/Build-Nightly.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if($runPublic -eq $false -and $existing_pnpcoresdk_hash -ne $pnpcoresdk_hash)
5151

5252
if ($runPublish -eq $true) {
5353

54-
$versionFileContents = Get-Content "$PSScriptRoot/../version.txt" -Raw
54+
$versionFileContents = (Get-Content "$PSScriptRoot/../version.txt" -Raw).Trim()
5555
if ($versionFileContents.Contains("%")) {
5656
$versionString = $versionFileContents.Replace("%", "0");
5757
$versionObject = [System.Management.Automation.SemanticVersion]::Parse($versionString)

documentation/Add-PnPField.md

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add a field
1717
### Add field to list (Default)
1818
```powershell
1919
Add-PnPField [-List <ListPipeBind>] -DisplayName <String> -InternalName <String> -Type <FieldType>
20-
[-Id <Guid>] [-AddToDefaultView] [-Required] [-Group <String>] [-ClientSideComponentId <Guid>]
20+
[-Id <Guid>] [-Formula <String>] [-Choices <String>] [-AddToDefaultView] [-Required] [-Group <String>] [-ClientSideComponentId <Guid>]
2121
[-ClientSideComponentProperties <String>] [-AddToAllContentTypes] [-Connection <PnPConnection>]
2222
[<CommonParameters>]
2323
```
@@ -30,17 +30,11 @@ Add-PnPField -List <ListPipeBind> -Field <FieldPipeBind> [-Connection <PnPConnec
3030

3131
### Add field to web
3232
```powershell
33-
Add-PnPField -DisplayName <String> -InternalName <String> -Type <FieldType> [-Id <Guid>]
33+
Add-PnPField -DisplayName <String> -InternalName <String> -Type <FieldType> [-Id <Guid>] [-Formula <String>] [-Choices <String>]
3434
[-ClientSideComponentId <Guid>] [-ClientSideComponentProperties <String>]
3535
[-Connection <PnPConnection>] [<CommonParameters>]
3636
```
3737

38-
### Add field by XML to list
39-
```powershell
40-
Add-PnPField [-AddToDefaultView] [-Required] [-Group <String>] [-AddToAllContentTypes]
41-
[-Connection <PnPConnection>] [<CommonParameters>]
42-
```
43-
4438
## DESCRIPTION
4539
Adds a field (a column) to a list or as a site column. To add a column of type Managed Metadata use the Add-PnPTaxonomyField cmdlet.
4640

@@ -67,14 +61,28 @@ Add-PnPField -List "Demo list" -DisplayName "Speakers" -InternalName "SPSSpeaker
6761

6862
This will add a field of type Multiple Choice to the list "Demo List". (you can pick several choices for the same item)
6963

64+
### EXAMPLE 4
65+
```powershell
66+
Add-PnPField -List "Demo List" -Field "MyTestCol"
67+
```
68+
69+
This will add an existing site column called "MyTestCol" to the list "Demo List".
70+
71+
### EXAMPLE 5
72+
```powershell
73+
Add-PnPField -Type Choice -Choices "PnP","Parker","Sharing Is Caring" -DisplayName "My Test Column" -InternalName "MyTestCol"
74+
```
75+
76+
This will add a site column of type Choice (only one choice value can be chosen at the same time) called "My Test Column" with three choice values.
77+
7078
## PARAMETERS
7179

7280
### -AddToDefaultView
7381
Switch Parameter if this field must be added to the default view
7482

7583
```yaml
7684
Type: SwitchParameter
77-
Parameter Sets: Add field to list, Add field by XML to list
85+
Parameter Sets: Add field to list, Add field to web
7886

7987
Required: False
8088
Position: Named
@@ -88,7 +96,20 @@ Switch Parameter if this field must be added to all content types
8896
8997
```yaml
9098
Type: SwitchParameter
91-
Parameter Sets: Add field to list, Add field by XML to list
99+
Parameter Sets: Add field to list, Add field to web
100+
101+
Required: False
102+
Position: Named
103+
Default value: None
104+
Accept pipeline input: False
105+
Accept wildcard characters: False
106+
```
107+
### -Choices
108+
The Choice values when field type is Choice or MultiChoice
109+
110+
```yaml
111+
Type: String[]
112+
Parameter Sets: Add field to list (Choice or MultiChoice Field Chosen), Add field to web (Choice or MultiChoice Field Chosen)
92113

93114
Required: False
94115
Position: Named
@@ -167,6 +188,20 @@ Accept pipeline input: False
167188
Accept wildcard characters: False
168189
```
169190
191+
### -Formula
192+
The Formula when Calculated column is chosen.
193+
194+
```yaml
195+
Type: String[]
196+
Parameter Sets: Add field to list (Calculated Field), Add field to web (Calculated Field)
197+
198+
Required: False
199+
Position: Named
200+
Default value: None
201+
Accept pipeline input: False
202+
Accept wildcard characters: False
203+
```
204+
170205
### -Group
171206
The group name to where this field belongs to
172207
@@ -239,7 +274,7 @@ Switch Parameter if the field is a required field
239274
240275
```yaml
241276
Type: SwitchParameter
242-
Parameter Sets: Add field to list, Add field by XML to list
277+
Parameter Sets: Add field to list, Add field to web
243278

244279
Required: False
245280
Position: Named

documentation/Add-PnPFileToSiteTemplate.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ title: Add-PnPFileToSiteTemplate
1010
# Add-PnPFileToSiteTemplate
1111

1212
## SYNOPSIS
13-
Adds a file to a PnP Provisioning Template
13+
Adds a file to a PnP Provisioning Template package
14+
15+
## Description
16+
17+
Allows adding a file to a PnP Provisioning Template package (.pnp) so that the file will get uploaded to the SharePoint Online site to which the template is being invoked. This allows the file to be referenced in i.e. a document template, site logo or any other component that references a file.
1418

1519
## SYNTAX
1620

@@ -35,17 +39,17 @@ Add-PnPFileToSiteTemplate [-Path] <String> [-SourceUrl] <String> [[-Container] <
3539

3640
### EXAMPLE 1
3741
```powershell
38-
Add-PnPFileToSiteTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder
42+
Add-PnPFileToSiteTemplate -Path template.pnp -Source "Instructions.docx" -Folder "Shared Documents"
3943
```
4044

41-
Adds a file to a PnP Site Template
45+
Embeds a file named "Instructions.docx" located in the current folder on the local machine into the PnP Site Template file "template.pnp" located in the current folder on the local machine, instructing it to be uploaded to the default document library when the template is applied to a site.
4246

4347
### EXAMPLE 2
4448
```powershell
45-
Add-PnPFileToSiteTemplate -Path template.xml -Source $sourceFilePath -Folder $targetFolder
49+
Add-PnPFileToSiteTemplate -Path c:\temp\template.pnp -Source "c:\temp\Sample.pptx" -Folder "Shared Documents\Samples"
4650
```
4751

48-
Adds a file reference to a PnP Site XML Template
52+
Embeds a file named "Sample.pptx" located in the c:\temp on the local machine into the PnP Site Template file located at "c:\temp\template.pnp" on the local machine, instructing it to be uploaded to the folder Samples located in the default document library when the template is applied to a site.
4953

5054
### EXAMPLE 3
5155
```powershell
@@ -63,7 +67,7 @@ Adds a file to a PnP Site Template with a custom container for the file
6367

6468
### EXAMPLE 5
6569
```powershell
66-
Add-PnPFileToSiteTemplate -Path template.pnp -SourceUrl "Shared%20Documents/ProjectStatus.docs"
70+
Add-PnPFileToSiteTemplate -Path template.pnp -SourceUrl "Shared%20Documents/ProjectStatus.docx"
6771
```
6872

6973
Adds a file to a PnP Provisioning Template retrieved from the currently connected site. The url can be server relative or web relative. If specifying a server relative url has to start with the current site url.
@@ -99,29 +103,29 @@ Accept wildcard characters: False
99103
```
100104
101105
### -FileLevel
102-
The level of the files to add. Defaults to Published
106+
The level of the files to add, defaults to Published.
103107
104108
```yaml
105109
Type: FileLevel
106110
Parameter Sets: (All)
107111

108112
Required: False
109113
Position: 4
110-
Default value: None
114+
Default value: Published
111115
Accept pipeline input: False
112116
Accept wildcard characters: False
113117
```
114118
115119
### -FileOverwrite
116-
Set to overwrite in site, Defaults to true
120+
Set to overwrite in site, defaults to true.
117121
118122
```yaml
119123
Type: SwitchParameter
120124
Parameter Sets: (All)
121125

122126
Required: False
123127
Position: 5
124-
Default value: None
128+
Default value: $true
125129
Accept pipeline input: False
126130
Accept wildcard characters: False
127131
```
@@ -155,7 +159,7 @@ Accept wildcard characters: False
155159
```
156160
157161
### -Source
158-
The file to add to the in-memory template, optionally including full path.
162+
The file to add to the PnP Provisioning Template, optionally including full path.
159163
160164
```yaml
161165
Type: String
@@ -169,7 +173,7 @@ Accept wildcard characters: False
169173
```
170174
171175
### -SourceUrl
172-
The file to add to the in-memory template, specifying its url in the current connected Web.
176+
The file to add to the PnP Provisioning Template, specifying its url in the current connected Web.
173177
174178
```yaml
175179
Type: String
@@ -196,10 +200,6 @@ Accept pipeline input: False
196200
Accept wildcard characters: False
197201
```
198202
199-
200-
201203
## RELATED LINKS
202204
203-
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
204-
205-
205+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

0 commit comments

Comments
 (0)