This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1873 from SharePoint/dev
February 2019 Release
- Loading branch information
Showing
59 changed files
with
2,652 additions
and
140 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
88 changes: 86 additions & 2 deletions
88
Binaries/release/SharePointPnP.Modernization.Framework.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,18 +70,24 @@ namespace SharePointPnP.PowerShell.Commands | |
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Description", Mandatory = false, HelpMessage = @"Specifies the description of the new site collection", ParameterSetName = ParameterSet_TEAM)] | ||
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Classification", Mandatory = false, HelpMessage = @"Specifies the classification of the new site collection", ParameterSetName = ParameterSet_TEAM)] | ||
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "IsPublic", Mandatory = false, HelpMessage = @"Specifies if new site collection is public. Defaults to false.", ParameterSetName = ParameterSet_TEAM)] | ||
[CmdletAdditionalParameter(ParameterType = typeof(string[]), ParameterName = "Owners", Mandatory = false, HelpMessage = @"Specifies the owners of the site. Specify the value as a string array: ""[email protected]"",""[email protected]""", ParameterSetName = ParameterSet_TEAM)] | ||
public class NewSite : PnPCmdlet, IDynamicParameters | ||
{ | ||
private const string ParameterSet_COMMUNICATIONBUILTINDESIGN = "Communication Site with Built-In Site Design"; | ||
private const string ParameterSet_COMMUNICATIONCUSTOMDESIGN = "Communication Site with Custom Design"; | ||
private const string ParameterSet_TEAM = "Team Site"; | ||
|
||
[Parameter(Mandatory = true, HelpMessage = "@Specifies with type of site to create.")] | ||
[Parameter(Mandatory = true, HelpMessage = "Specifies with type of site to create.")] | ||
public SiteType Type; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = "If specified the site will be associated to the hubsite as identified by this id")] | ||
public GuidPipeBind HubSiteId; | ||
|
||
private CommunicationSiteParameters _communicationSiteParameters; | ||
private TeamSiteParameters _teamSiteParameters; | ||
|
||
|
||
|
||
public object GetDynamicParameters() | ||
{ | ||
switch (Type) | ||
|
@@ -118,6 +124,7 @@ protected override void ExecuteCmdlet() | |
creationInformation.ShareByEmailEnabled = _communicationSiteParameters.AllowFileSharingForGuestUsers || _communicationSiteParameters.ShareByEmailEnabled; | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
creationInformation.Lcid = _communicationSiteParameters.Lcid; | ||
creationInformation.HubSiteId = HubSiteId.Id; | ||
if (ParameterSetName == "CommunicationCustomInDesign") | ||
{ | ||
creationInformation.SiteDesignId = _communicationSiteParameters.SiteDesignId.Id; | ||
|
@@ -140,6 +147,8 @@ protected override void ExecuteCmdlet() | |
creationInformation.Description = _teamSiteParameters.Description; | ||
creationInformation.IsPublic = _teamSiteParameters.IsPublic; | ||
creationInformation.Lcid = _teamSiteParameters.Lcid; | ||
creationInformation.HubSiteId = HubSiteId.Id; | ||
creationInformation.Owners = _teamSiteParameters.Owners; | ||
|
||
var returnedContext = OfficeDevPnP.Core.Sites.SiteCollection.Create(ClientContext, creationInformation); | ||
//var results = ClientContext.CreateSiteAsync(creationInformation); | ||
|
@@ -206,6 +215,9 @@ public class TeamSiteParameters | |
|
||
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TEAM)] | ||
public uint Lcid; | ||
|
||
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TEAM)] | ||
public string[] Owners; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.