Skip to content

Commit 96e5989

Browse files
authored
Merge pull request MicrosoftDocs#143 from erwinvanhunen/master
SharePoint PnP PowerShell Documentation updates
2 parents fbcb895 + 3cd359f commit 96e5989

File tree

203 files changed

+3248
-329
lines changed

Some content is hidden

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

203 files changed

+3248
-329
lines changed

sharepoint/docs-conceptual/sharepoint-pnp/sharepoint-pnp-cmdlets.md

Lines changed: 104 additions & 51 deletions
Large diffs are not rendered by default.

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPApp.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ Add/uploads an available app to the app catalog
1010

1111
## SYNTAX
1212

13+
### Add only
1314
```powershell
1415
Add-PnPApp -Path <String>
16+
[-Overwrite [<SwitchParameter>]]
17+
[-Connection <SPOnlineConnection>]
18+
```
19+
20+
### Add and Publish
21+
```powershell
22+
Add-PnPApp -Publish [<SwitchParameter>]
23+
-Path <String>
24+
[-SkipFeatureDeployment [<SwitchParameter>]]
25+
[-Overwrite [<SwitchParameter>]]
1526
[-Connection <SPOnlineConnection>]
1627
```
1728

@@ -24,20 +35,63 @@ PS:> Add-PnPApp -Path ./myapp.sppkg
2435

2536
This will upload the specified app package to the app catalog
2637

38+
### ------------------EXAMPLE 2------------------
39+
```powershell
40+
PS:> Add-PnPApp -Path ./myapp.sppkg -Publish
41+
```
42+
43+
This will upload the specified app package to the app catalog and deploy/trust it at the same time.
44+
2745
## PARAMETERS
2846

47+
### -Overwrite
48+
Overwrites the existing app package if it already exists
49+
50+
```yaml
51+
Type: SwitchParameter
52+
Parameter Sets: (All)
53+
54+
Required: False
55+
Position: Named
56+
Accept pipeline input: False
57+
```
58+
2959
### -Path
3060
Specifies the Id or an actual app metadata instance
3161
3262
```yaml
3363
Type: String
34-
Parameter Sets: (All)
64+
Parameter Sets: Add only
3565

3666
Required: True
3767
Position: 0
3868
Accept pipeline input: True
3969
```
4070
71+
### -Publish
72+
This will deploy/trust an app into the app catalog
73+
74+
```yaml
75+
Type: SwitchParameter
76+
Parameter Sets: Add and Publish
77+
78+
Required: True
79+
Position: Named
80+
Accept pipeline input: False
81+
```
82+
83+
### -SkipFeatureDeployment
84+
85+
86+
```yaml
87+
Type: SwitchParameter
88+
Parameter Sets: Add and Publish
89+
90+
Required: False
91+
Position: Named
92+
Accept pipeline input: False
93+
```
94+
4195
### -Connection
4296
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
4397

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPClientSidePage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Accept pipeline input: False
124124
```
125125
126126
### -Web
127-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
127+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
128128
129129
```yaml
130130
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPClientSidePageSection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Accept pipeline input: False
9393
```
9494
9595
### -Web
96-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
96+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
9797
9898
```yaml
9999
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPClientSideText.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Accept pipeline input: False
117117
```
118118
119119
### -Web
120-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
120+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
121121
122122
```yaml
123123
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPClientSideWebPart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Accept pipeline input: False
179179
```
180180
181181
### -Web
182-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
182+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
183183
184184
```yaml
185185
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPContentType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Accept pipeline input: False
104104
```
105105
106106
### -Web
107-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
107+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
108108
109109
```yaml
110110
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPContentTypeToDocumentSet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This will add the content type called 'Test CT' to the document set called ''Tes
2929
### ------------------EXAMPLE 2------------------
3030
```powershell
3131
PS:> $docset = Get-PnPDocumentSetTemplate -Identity "Test Document Set"
32-
PS:> $ct = Get-SPOContentType -Identity "Test CT"
32+
PS:> $ct = Get-PnPContentType -Identity "Test CT"
3333
PS:> Add-PnPContentTypeToDocumentSet -ContentType $ct -DocumentSet $docset
3434
```
3535

@@ -81,7 +81,7 @@ Accept pipeline input: False
8181
```
8282
8383
### -Web
84-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
84+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
8585
8686
```yaml
8787
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPContentTypeToList.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Accept pipeline input: False
7878
```
7979
8080
### -Web
81-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
81+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
8282
8383
```yaml
8484
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPCustomAction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Accept pipeline input: False
252252
```
253253
254254
### -Web
255-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
255+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
256256
257257
```yaml
258258
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPDataRowsToProvisioningTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Accept pipeline input: False
124124
```
125125
126126
### -Web
127-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
127+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
128128
129129
```yaml
130130
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPDocumentSet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Accept pipeline input: False
7878
```
7979
8080
### -Web
81-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
81+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
8282
8383
```yaml
8484
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPEventReceiver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Accept pipeline input: False
139139
```
140140
141141
### -Web
142-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
142+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
143143
144144
```yaml
145145
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPField.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Accept pipeline input: False
235235
```
236236
237237
### -Web
238-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
238+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
239239
240240
```yaml
241241
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFieldFromXml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Accept pipeline input: False
7474
```
7575
7676
### -Web
77-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
77+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
7878
7979
```yaml
8080
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFieldToContentType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Accept pipeline input: False
9191
```
9292
9393
### -Web
94-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
94+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
9595
9696
```yaml
9797
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFile.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,45 @@ Accept pipeline input: False
236236
```
237237
238238
### -Values
239-
Use the internal names of the fields when specifying field names
239+
Use the internal names of the fields when specifying field names.
240+
241+
Single line of text: -Values @{"Title" = "Title New"}
242+
243+
Multiple lines of text: -Values @{"MultiText" = "New text\n\nMore text"}
244+
245+
Rich text: -Values @{"MultiText" = "<strong>New</strong> text"}
246+
247+
Choice: -Values @{"Choice" = "Value 1"}
248+
249+
Number: -Values @{"Number" = "10"}
250+
251+
Currency: -Values @{"Number" = "10"}
252+
253+
Currency: -Values @{"Currency" = "10"}
254+
255+
Date and Time: -Values @{"DateAndTime" = "03/10/2015 14:16"}
256+
257+
Lookup (id of lookup value): -Values @{"Lookup" = "2"}
258+
259+
Multi value lookup (id of lookup values as array 1): -Values @{"MultiLookupField" = "1","2"}
260+
261+
Multi value lookup (id of lookup values as array 2): -Values @{"MultiLookupField" = 1,2}
262+
263+
Multi value lookup (id of lookup values as string): -Values @{"MultiLookupField" = "1,2"}
264+
265+
Yes/No: -Values @{"YesNo" = $false}
266+
267+
Person/Group (id of user/group in Site User Info List or email of the user, seperate multiple values with a comma): -Values @{"Person" = "[email protected]","21"}
268+
269+
Managed Metadata (single value with path to term): -Values @{"MetadataField" = "CORPORATE|DEPARTMENTS|FINANCE"}
270+
271+
Managed Metadata (single value with id of term): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-0b3d0299d818"} with Id of term
272+
273+
Managed Metadata (multiple values with paths to terms): -Values @{"MetadataField" = "CORPORATE|DEPARTMENTS|FINANCE","CORPORATE|DEPARTMENTS|HR"}
274+
275+
Managed Metadata (multiple values with ids of terms): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-0b3d0299d818","52d88107-c2a8-4bf0-adfa-04bc2305b593"}
276+
277+
Hyperlink or Picture: -Values @{"Hyperlink" = "https://github.com/OfficeDev/, OfficePnp"}
240278
241279
```yaml
242280
Type: Hashtable
@@ -260,7 +298,7 @@ Accept pipeline input: False
260298
```
261299
262300
### -Web
263-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
301+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
264302
265303
```yaml
266304
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFileToProvisioningTemplate.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ Add-PnPFileToProvisioningTemplate -Path <String>
1515
-Source <String>
1616
-Folder <String>
1717
[-Container <String>]
18+
[-FileLevel <FileLevel>]
1819
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
20+
[-FileOverwrite [<SwitchParameter>]]
1921
```
2022

2123
## EXAMPLES
@@ -25,14 +27,28 @@ Add-PnPFileToProvisioningTemplate -Path <String>
2527
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder
2628
```
2729

28-
Adds a file to an in-memory PnP Provisioning Template
30+
Adds a file to a PnP Provisioning Template
2931

3032
### ------------------EXAMPLE 2------------------
3133
```powershell
34+
PS:> Add-PnPFileToProvisioningTemplate -Path template.xml -Source $sourceFilePath -Folder $targetFolder
35+
```
36+
37+
Adds a file reference to a PnP Provisioning XML Template
38+
39+
### ------------------EXAMPLE 3------------------
40+
```powershell
41+
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source "./myfile.png" -Folder "folderinsite" -FileLevel Published -FileOverwrite:$false
42+
```
43+
44+
Adds a file to a PnP Provisioning Template, specifies the level as Published and defines to not overwrite the file if it exists in the site.
45+
46+
### ------------------EXAMPLE 4------------------
47+
```powershell
3248
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder -Container $container
3349
```
3450

35-
Adds a file to an in-memory PnP Provisioning Template with a custom container for the file
51+
Adds a file to a PnP Provisioning Template with a custom container for the file
3652

3753
## PARAMETERS
3854

@@ -48,6 +64,30 @@ Position: 3
4864
Accept pipeline input: False
4965
```
5066
67+
### -FileLevel
68+
The level of the files to add. Defaults to Published
69+
70+
```yaml
71+
Type: FileLevel
72+
Parameter Sets: (All)
73+
74+
Required: False
75+
Position: 4
76+
Accept pipeline input: False
77+
```
78+
79+
### -FileOverwrite
80+
Set to overwrite in site, Defaults to true
81+
82+
```yaml
83+
Type: SwitchParameter
84+
Parameter Sets: (All)
85+
86+
Required: False
87+
Position: 5
88+
Accept pipeline input: False
89+
```
90+
5191
### -Folder
5292
The target Folder for the file to add to the in-memory template.
5393

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFolder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Accept pipeline input: False
6565
```
6666
6767
### -Web
68-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
68+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
6969
7070
```yaml
7171
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPHtmlPublishingPageLayout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Accept pipeline input: False
104104
```
105105
106106
### -Web
107-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
107+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
108108
109109
```yaml
110110
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPIndexedProperty.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Accept pipeline input: False
4343
```
4444
4545
### -Web
46-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
46+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
4747
4848
```yaml
4949
Type: WebPipeBind

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPJavaScriptBlock.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Accept pipeline input: False
102102
```
103103
104104
### -Web
105-
The GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
105+
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
106106
107107
```yaml
108108
Type: WebPipeBind

0 commit comments

Comments
 (0)