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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ Please see following page for additional insights on the model.
14
14
15
15
## Building the source code ##
16
16
17
+
Once you have downloaded the code, in the folder with the PnP PowerShell source code, open the solution file SharePointPnP.PowerShell.sln.
18
+
17
19
If you have set up up the projects and you are ready to build the source code, make sure to build the SharePointPnP.PowerShellModuleFilesGenerator project first. This project will be executed after every build and it will generate the required PSD1 and XML files with cmdlet documentation in them.
18
20
19
21
When you build the solution a postbuild script will copy the required files to a folder in your users folder called
@@ -23,7 +25,7 @@ To debug the cmdlets: launch PowerShell and attach Visual Studio to the powershe
23
25
24
26
## Code contributions
25
27
In order to succesfully compile the PnP PowerShell solution you will _also_ have to download *and build in Visual Studio* the [PnP-Sites-Core](https://github.com/OfficeDev/PnP-Sites-Core) repository and make the dev branch available. The PowerShell solution depends on it. In order to succesfully
26
-
compile it, make sure that PnP-Sites-Core is located at the same level as PnP-PowerShell.
28
+
compile it, make sure that PnP-Sites-Core is located at the same level as PnP-PowerShell and you open the solution file OfficeDevPnP.Core.sln located in the Core subfolder of the sourcecode.
[CmdletExample(Code=@"PS:> Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/hubsite -Principals ""[email protected]"",""[email protected]"" -Rights Join",Remarks="This example shows how to grant right to myuser and myotheruser to associate their sites with hubsite",SortOrder=1)]
15
+
[CmdletExample(Code=@"PS:> Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/hubsite -Principals ""[email protected]"",""[email protected]"" -Rights Join",Remarks="This example shows how to grant rights to myuser and myotheruser to associate their sites with the provided Hub Site",SortOrder=1)]
16
+
[CmdletExample(Code=@"PS:> Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/hubsite -Principals ""[email protected]"" -Rights None",Remarks="This example shows how to revoke rights from myuser to associate their sites with the provided Hub Site",SortOrder=2)]
[Parameter(Position=0,ValueFromPipeline=true,Mandatory=true,HelpMessage="The Hub Site to set the permissions on to associate another site with this Hub Site")]
20
20
[Alias("HubSite")]
21
21
publicHubSitePipeBindIdentity{get;set;}
22
22
23
-
[Parameter(Mandatory=true)]
23
+
[Parameter(Mandatory=true,HelpMessage="One or more usernames that will be given or revoked the permission to associate a site with this Hub Site. It does not replace permissions given out before but adds to the already existing permissions.")]
24
24
publicstring[]Principals{get;set;}
25
25
26
-
[Parameter(Mandatory=true)]
26
+
[Parameter(Mandatory=true,HelpMessage="Provide Join to give permissions to associate a site with this Hub Site or use None to revoke the permissions for the user(s) specified with the Principals argument")]
[CmdletHelp("BETA: This cmdlet is using early release APIs. Notice that functionality and parameters can change. Creates a new site collection",
12
+
[CmdletHelp("Creates a new site collection",
18
13
"The New-PnPSite cmdlet creates a new site collection for the current tenant. Currently only 'modern' sites like Communication Site and the Modern Team Site are supported. If you want to create a classic site, use New-PnPTenantSite.",
19
14
OutputType=typeof(string),
20
15
OutputTypeDescription="Returns the url of the newly created site collection",
Remarks=@"This will create a new Communications Site collection with the title 'Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso'. The classification for the site will be set to ""HBI""",
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 Communications Site collection with the title 'Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso'. Allows owners to invite users outside of the organization.",
Remarks=@"This will create a new Communications Site collection with the title 'Contoso' and the url 'https://tenant.sharepoint.com/sites/contoso' and sets the default language to Italian.",
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 '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.",
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 default language of the site to Italian.",
52
+
SortOrder=9)]
50
53
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_COMMUNICATIONBUILTINDESIGN)]
51
54
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
52
55
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Url",Mandatory=true,HelpMessage=@"Specifies the full url of the new site collection",ParameterSetName=ParameterSet_COMMUNICATIONBUILTINDESIGN)]
[CmdletAdditionalParameter(ParameterType=typeof(GuidPipeBind),ParameterName="SiteDesignId",Mandatory=true,HelpMessage=@"Specifies the site design id to use for the new site collection. If specified will override SiteDesign",ParameterSetName=ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
62
65
[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
66
[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)]
67
+
[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_TEAM)]
64
68
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Title",Mandatory=true,HelpMessage=@"Specifies the title of the new site collection",ParameterSetName=ParameterSet_TEAM)]
65
69
[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
70
[CmdletAdditionalParameter(ParameterType=typeof(string),ParameterName="Description",Mandatory=false,HelpMessage=@"Specifies the description of the new site collection",ParameterSetName=ParameterSet_TEAM)]
Copy file name to clipboardExpand all lines: Commands/Admin/NewTenantSite.cs
+2-2
Original file line number
Diff line number
Diff line change
@@ -46,10 +46,10 @@ public class NewTenantSite : PnPAdminCmdlet
46
46
[Parameter(Mandatory=true,HelpMessage=@"Specifies the user name of the site collection's primary owner. The owner must be a user instead of a security group or an email-enabled security group.")]
47
47
publicstringOwner=string.Empty;
48
48
49
-
[Parameter(Mandatory=false,HelpMessage=@"Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splanguage.lcid.aspx")]
49
+
[Parameter(Mandatory=false,HelpMessage=@"Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splanguage.lcid.aspx. To get the list of supported languages use: (Get-PnPWeb -Includes RegionalSettings.InstalledLanguages).RegionalSettings.InstalledLanguages ")]
50
50
publicuintLcid=1033;
51
51
52
-
[Parameter(Mandatory=false,HelpMessage=@"Specifies the site collection template type. Use the Get-PnPWebTemplate cmdlet to get the list of valid templates. If no template is specified, one can be added later. The Template and LocaleId parameters must be a valid combination as returned from the Get-PnPWebTemplates cmdlet.")]
52
+
[Parameter(Mandatory=false,HelpMessage=@"Specifies the site collection template type. Use the Get-PnPWebTemplates cmdlet to get the list of valid templates. If no template is specified, one can be added later. The Template and LocaleId parameters must be a valid combination as returned from the Get-PnPWebTemplates cmdlet.")]
53
53
publicstringTemplate="STS#0";
54
54
55
55
[Parameter(Mandatory=true,HelpMessage="Use Get-PnPTimeZoneId to retrieve possible timezone values")]
Remarks=@"This will deploy/trust an app into the app catalog. Notice that the app needs to be available in the tenant scoped app catalog",SortOrder=1)]
Remarks=@"This will deploy/trust an app into the app catalog. Notice that the app needs to be available in the site collection scoped app catalog",SortOrder=1)]
0 commit comments