You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
Remarks=@"This will create a new Communications Site collection with the title 'Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso'. File sharing for guest users will be enabled.",
Remarks=@"This will create a new Modern Team Site collection with the title 'Team Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso' or 'https://tenant.sharepoint.com/teams/contoso' based on the managed path configuration in the SharePoint Online Admin portal.",
Remarks=@"This will create a new Modern Team Site collection with the title 'Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso' and sets the site to public.",
Remarks=@"This will create a new Modern Team Site collection with the title 'Team Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso' or 'https://tenant.sharepoint.com/teams/contoso' based on the managed path configuration in the SharePoint Online Admin portal and sets the site to public.",
49
49
SortOrder=7)]
50
50
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_COMMUNICATIONBUILTINDESIGN)]
51
51
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
[CmdletAdditionalParameter(ParameterType=typeof(uint),ParameterName="Lcid",Mandatory=false,HelpMessage=@"Specifies the language of the new site collection. Defaults to the current language of the web connected to.",ParameterSetName=ParameterSet_COMMUNICATIONBUILTINDESIGN)]
63
63
[CmdletAdditionalParameter(ParameterType=typeof(uint),ParameterName="Lcid",Mandatory=false,HelpMessage=@"Specifies the language of the new site collection. Defaults to the current language of the web connected to.",ParameterSetName=ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
64
64
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_TEAM)]
65
-
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Alias",Mandatory=true,HelpMessage=@"Specifies the alias of the new site collection",ParameterSetName=ParameterSet_TEAM)]
65
+
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Alias",Mandatory=true,HelpMessage=@"Specifies the alias of the new site collection which represents the part of the URL that will be assigned to the site behind 'https://tenant.sharepoint.com/sites/' or 'https://tenant.sharepoint.com/teams/' based on the managed path configuration in the SharePoint Online Admin portal",ParameterSetName=ParameterSet_TEAM)]
66
66
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Description",Mandatory=false,HelpMessage=@"Specifies the description of the new site collection",ParameterSetName=ParameterSet_TEAM)]
67
67
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Classification",Mandatory=false,HelpMessage=@"Specifies the classification of the new site collection",ParameterSetName=ParameterSet_TEAM)]
68
68
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="IsPublic",Mandatory=false,HelpMessage=@"Specifies if new site collection is public. Defaults to false.",ParameterSetName=ParameterSet_TEAM)]
Remarks="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'",
@@ -19,21 +20,44 @@ public class AddDocumentSet : PnPWebCmdlet
19
20
[Parameter(Mandatory=true,HelpMessage="The name of the list, its ID or an actual list object from where the document set needs to be added")]
20
21
publicListPipeBindList;
21
22
22
-
[Parameter(Mandatory=true,HelpMessage="The name of the document set")]
23
+
[Parameter(Mandatory=true,HelpMessage="The name of the document set")]
23
24
publicstringName;
24
25
25
-
[Parameter(Mandatory=true,HelpMessage="The name of the content type, its ID or an actual content object referencing to the document set.")]
26
+
[Parameter(Mandatory=true,HelpMessage="The name of the content type, its ID or an actual content object referencing to the document set")]
26
27
publicContentTypePipeBindContentType;
28
+
27
29
protectedoverridevoidExecuteCmdlet()
28
30
{
29
31
varlist=List.GetList(SelectedWeb);
30
-
list.EnsureProperty(l =>l.RootFolder);
32
+
list.EnsureProperties(l =>l.RootFolder, l =>l.ContentTypes);
[CmdletHelp("Gets the label/tag of the specfied list or library (if applicable)",Category=CmdletHelpCategory.InformationManagement,SupportedPlatform=CmdletSupportedPlatform.Online)]
11
+
[CmdletExample(
12
+
Code=@"PS:> Get-PnPLabel -List ""Demo List""",
13
+
Remarks=@"This gets the label which is set to a list or a library.",SortOrder=1)]
14
+
15
+
publicclassGetListComplianceTag:PnPWebCmdlet
16
+
{
17
+
[Parameter(Mandatory=true,ValueFromPipeline=true,Position=0,HelpMessage="The ID or Url of the list.")]
[CmdletHelp("Sets a label/tag on the specified list or library",Category=CmdletHelpCategory.InformationManagement,SupportedPlatform=CmdletSupportedPlatform.Online)]
Remarks=@"This sets an O365 label on the specified list or library. Next, it also blocks the ability to either edit or delete the item. ",SortOrder=3)]
21
+
publicclassSetListComplianceTag:PnPWebCmdlet
22
+
{
23
+
[Parameter(Mandatory=true,ValueFromPipeline=true,Position=0,HelpMessage="The ID or Url of the list.")]
24
+
publicListPipeBindList;
25
+
26
+
[Parameter(Mandatory=true,HelpMessage="The name of the label.")]
27
+
publicstringLabel;
28
+
29
+
[Parameter(Mandatory=false,HelpMessage="Apply label to existing items in the library.")]
30
+
publicboolSyncToItems;
31
+
32
+
[Parameter(Mandatory=false,HelpMessage="Block deletion of items in the library.")]
33
+
publicboolBlockDeletion;
34
+
35
+
[Parameter(Mandatory=false,HelpMessage="Block edititing of items in the library.")]
0 commit comments