Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 48af8f6

Browse files
Merge pull request #2348 from SharePoint/dev
November 2019 Release
2 parents e062ec4 + 412d208 commit 48af8f6

File tree

57 files changed

+3014
-327
lines changed

Some content is hidden

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

57 files changed

+3014
-327
lines changed
39 KB
Binary file not shown.

Binaries/SharePointPnP.Modernization.Framework.xml

Lines changed: 894 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
22.2 KB
Binary file not shown.

Binaries/release/SharePointPnP.Modernization.Framework.xml

Lines changed: 894 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,34 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
77

8-
## [Unreleased]
8+
## [3.15.1911.0]
99

1010
### Added
1111

12+
- Added Request-PnPAccessToken to retrieve an OAuth2 access token using the password grant.
13+
- Added additional properties to Set-PnPHubSite
14+
- Added Get-PnPHubSiteChild cmdlet to list all child sites of a hubsite
15+
- ConvertTo-PnPClientSidePage: Added support for user mapping via `-UserMappingFile, `-LDAPConnectionString` and `-SkipUserMapping` parameters #2340
16+
- ConvertTo-PnPClientSidePage: Added support for defining the target folder of a transformed page via `-TargetPageFolder`
17+
- Added Get-PnPSearchSettings to retreive current search settings for a site
18+
- Added Set-PnPSearchSettings to set search related settings on a site
19+
1220
### Changed
1321

22+
- Cmdlets related to provisioning and tenant templates now output more detailed error information in case of a schema issue.
23+
- Fixes issue where site design was not being applied when using New-PnPSite
24+
- Fixed incorrect usage of SwitchParameter in Set-PnPSite cmdlet
25+
- Fixed issue when connecting to single level domain URLs
26+
- Disabled TimeZone as mandatory parameter for New-PnPTenantSite when using an on-premises version of PnP PowerShell
27+
1428
### Contributors
1529

30+
- Gautam Sheth [gautamdsheth]
31+
- Koen Zomers [KoenZomers]
32+
- Laurens Hoogendoorn [laurens1984]
33+
- Jens Otto Hatlevold [jensotto]
34+
- Paul Bullock [pkbullock]
35+
1636
## [3.14.1910.1]
1737

1838
### Added

Commands/Admin/GetHubSite.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#if !ONPREMISES
2-
using Microsoft.Online.SharePoint.TenantAdministration;
32
using Microsoft.SharePoint.Client;
43
using SharePointPnP.PowerShell.CmdletHelpAttributes;
54
using SharePointPnP.PowerShell.Commands.Base;
65
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
7-
using System;
86
using System.Management.Automation;
97

108
namespace SharePointPnP.PowerShell.Commands.Admin
@@ -22,11 +20,10 @@ public class GetHubSite : PnPAdminCmdlet
2220

2321
protected override void ExecuteCmdlet()
2422
{
25-
if (this.Identity != null)
23+
if (Identity != null)
2624
{
27-
HubSiteProperties hubSiteProperties;
28-
hubSiteProperties = base.Tenant.GetHubSitePropertiesByUrl(this.Identity.Url);
29-
ClientContext.Load<HubSiteProperties>(hubSiteProperties);
25+
var hubSiteProperties = Identity.GetHubSite(Tenant);
26+
ClientContext.Load(hubSiteProperties);
3027
ClientContext.ExecuteQueryRetry();
3128
WriteObject(hubSiteProperties);
3229
}

Commands/Admin/GetHubSiteChild.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#if !ONPREMISES
2+
using Microsoft.Online.SharePoint.TenantAdministration;
3+
using Microsoft.SharePoint.Client;
4+
using SharePointPnP.PowerShell.CmdletHelpAttributes;
5+
using SharePointPnP.PowerShell.Commands.Base;
6+
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
7+
using System;
8+
using System.Management.Automation;
9+
using Resources = SharePointPnP.PowerShell.Commands.Properties.Resources;
10+
11+
namespace SharePointPnP.PowerShell.Commands.Admin
12+
{
13+
[Cmdlet(VerbsCommon.Get, "PnPHubSiteChild")]
14+
[CmdletHelp(@"Retrieves all sites linked to a specific hub site",
15+
"Retrieves all sites linked to a specific hub site",
16+
Category = CmdletHelpCategory.TenantAdmin,
17+
SupportedPlatform = CmdletSupportedPlatform.Online)]
18+
[CmdletExample(Code = @"PS:> Get-PnPHubChildSite -Identity https://contoso.sharepoint.com/sites/myhubsite", Remarks = "Returns the sites having configured the provided hub site as their hub site", SortOrder = 1)]
19+
public class GetHubSiteChild : PnPAdminCmdlet
20+
{
21+
[Parameter(ValueFromPipeline = true, Mandatory = true, HelpMessage = "The URL of the hubsite for which to receive the sites refering to it")]
22+
public HubSitePipeBind Identity { get; set; }
23+
24+
protected override void ExecuteCmdlet()
25+
{
26+
HubSiteProperties hubSiteProperties;
27+
try
28+
{
29+
hubSiteProperties = Identity.GetHubSite(Tenant);
30+
ClientContext.Load(hubSiteProperties, h => h.ID);
31+
ClientContext.ExecuteQueryRetry();
32+
}
33+
catch (ServerException ex)
34+
{
35+
if (ex.ServerErrorTypeName.Equals("System.IO.FileNotFoundException"))
36+
{
37+
throw new ArgumentException(Resources.SiteNotFound, nameof(Identity));
38+
}
39+
40+
throw ex;
41+
}
42+
43+
// Get the ID of the hubsite for which we need to find child sites
44+
var hubSiteId = hubSiteProperties.ID;
45+
46+
WriteObject(Tenant.GetHubSiteChildUrls(hubSiteId), true);
47+
}
48+
}
49+
}
50+
#endif

Commands/Admin/GrantHubSiteRights.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class GrantHubSiteRights : PnPAdminCmdlet
2828

2929
protected override void ExecuteCmdlet()
3030
{
31-
base.Tenant.GrantHubSiteRights(Identity.Url, Principals, Rights);
31+
base.Tenant.GrantHubSiteRights(Identity.Url ?? Identity.GetHubSite(Tenant).SiteUrl, Principals, Rights);
3232
ClientContext.ExecuteQueryRetry();
3333
}
3434
}

Commands/Admin/NewSite.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected override void ExecuteCmdlet()
130130
{
131131
creationInformation.HubSiteId = HubSiteId.Id;
132132
}
133-
if (ParameterSetName == "CommunicationCustomInDesign")
133+
if (ParameterSetName == ParameterSet_COMMUNICATIONCUSTOMDESIGN)
134134
{
135135
creationInformation.SiteDesignId = _communicationSiteParameters.SiteDesignId.Id;
136136
}

Commands/Admin/NewTenantSite.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ public class NewTenantSite : PnPAdminCmdlet
5555
[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.")]
5656
public string Template = "STS#0";
5757

58+
#if ONPREMISES
59+
[Parameter(Mandatory = false, HelpMessage = "Use Get-PnPTimeZoneId to retrieve possible timezone values")]
60+
#else
5861
[Parameter(Mandatory = true, HelpMessage = "Use Get-PnPTimeZoneId to retrieve possible timezone values")]
62+
#endif
5963
public int TimeZone;
6064

6165
[Parameter(Mandatory = false, HelpMessage = @"Specifies the quota for this site collection in Sandboxed Solutions units. This value must not exceed the company's aggregate available Sandboxed Solutions quota. The default value is 0. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010 : http://msdn.microsoft.com/en-us/library/gg615462.aspx.")]

0 commit comments

Comments
 (0)