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

Commit

Permalink
Merge pull request #2081 from SharePoint/dev
Browse files Browse the repository at this point in the history
May 2019 Release
  • Loading branch information
erwinvanhunen committed May 10, 2019
2 parents bbd4739 + 4e3ae3d commit fc5b2ac
Show file tree
Hide file tree
Showing 63 changed files with 1,539 additions and 944 deletions.
Binary file modified Binaries/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
184 changes: 167 additions & 17 deletions Binaries/SharePointPnP.Modernization.Framework.xml

Large diffs are not rendered by default.

Binary file modified Binaries/release/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
184 changes: 167 additions & 17 deletions Binaries/release/SharePointPnP.Modernization.Framework.xml

Large diffs are not rendered by default.

40 changes: 39 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,45 @@ All notable changes to this project will be documented in this file.

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

## [3.8.1904.0] - unreleased
## [3.10.1906.0 - June 2019 Release]

### Added

### Changed

### Deprecated

### Contributors

## [3.9.1905.0 - May 2019 Release]

### Added

- Added Template as a possible PromoteAs value for a Add-PnPClientSidePage and Set-PnPClientSidePage
- Added -HeaderLayout and -HeaderEmphasis parameters to Set-PnPWeb
- Support to specify lcid for Export-PnPTaxonomy for a particular termset
- Added support in the Navigation cmdlets to manage the site footer on modern sites.
- Added Invoke-PnPSPRestMethod cmdlet to execute REST requests towards a SharePoint site.
- Added Enable-PnPCommSite cmdlet to convert the root site collection of a tenant into a communication site.

### Changed

- Updated documentation
- ConvertTo-PnPClientSidePage: modernize the first page in case there's multiple pages matching the provided pattern (parameters identity, folder and library)
- ConvertTo-PnPClientSidePage: added parameter `-PublishingTargetPageName` parameter that allows one to override the name of the target publishing page. This is needed for some pages like default.aspx
- ConvertTo-PnPClientSidePage: added parameter `-SkipUrlRewrite` to prevent URL rewriting in cross site transformation scenarios
- Export-PnPClientSidePageMapping: added parameter `-PublishingPage` to scope the page layout analysis to the page layout of the provided file
- Export-PnPClientSidePageMapping: added parameter `-AnalyzeOOBPageLayouts` to allow analysis of OOB page layouts. By default OOB page layouts will be skipped
- Fix to allow setting list property bag values on NoScript sites

### Deprecated
- Removed support for the Template Gallery as the gallery itself is not online anymore.

### Contributors
- Heinrich Ulbricht [heinrich-ulbricht]
- Andres Mariano Gorzelany [get-itips]

## [3.8.1904.0]

### Added

Expand Down
33 changes: 33 additions & 0 deletions Commands/Admin/EnableCommSite.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#if !ONPREMISES
using Microsoft.SharePoint.Client;
using SharePointPnP.PowerShell.CmdletHelpAttributes;
using SharePointPnP.PowerShell.Commands.Base;
using System.Management.Automation;


namespace SharePointPnP.PowerShell.Commands
{
[Cmdlet(VerbsLifecycle.Enable, "PnPCommSite")]
[CmdletHelp("Enable communication site on the root site of a tenant",
@"The Enable-PnPCommSite cmdlet converts the root site of a tenant to be a communication site. This action is not reversible.",
Category = CmdletHelpCategory.TenantAdmin, SupportedPlatform = CmdletSupportedPlatform.Online)]
[CmdletExample(
Code = @"PS:> Enable-PnPCommSite",
Remarks = @"This will convert the root site collection to become a communication site",
SortOrder = 1)]
[CmdletExample(
Code = @"PS:> Enable-PnPCommSite -SiteUrl https://tenant.sharepoint.com",
Remarks = @"This will convert the root site collection to become a communication site",
SortOrder = 2)]
public class EnableCommSite : PnPAdminCmdlet
{
[Parameter(Mandatory = false, HelpMessage = @"Specifies the full URL of the new site collection. It must be in a valid managed path in the company's site. For example, for company contoso, valid managed paths are https://contoso.sharepoint.com/sites and https://contoso.sharepoint.com/teams.")]
public string SiteUrl;

protected override void ExecuteCmdlet()
{
Tenant.EnableCommSite(SiteUrl);
}
}
}
#endif
10 changes: 5 additions & 5 deletions Commands/Admin/NewSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace SharePointPnP.PowerShell.Commands
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.",
SortOrder = 5)]
[CmdletExample(
Code = @"PS:> New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -Lcid 1044",
Code = @"PS:> New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -Lcid 1040",
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.",
SortOrder = 6)]
[CmdletExample(
Expand All @@ -52,8 +52,8 @@ namespace SharePointPnP.PowerShell.Commands
SortOrder = 9)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Title", Mandatory = true, HelpMessage = @"Specifies the title of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONBUILTINDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Title", Mandatory = true, HelpMessage = @"Specifies the title of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Url", Mandatory = true, HelpMessage = @"Specifies the full url of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONBUILTINDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Url", Mandatory = true, HelpMessage = @"Specifies the full url of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Url", Mandatory = true, HelpMessage = @"Specifies the full url of the new site collection, this parameter only applies to Communications Sites", ParameterSetName = ParameterSet_COMMUNICATIONBUILTINDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Url", Mandatory = true, HelpMessage = @"Specifies the full url of the new site collection, this parameter only applies to Communications Sites", ParameterSetName = ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Description", Mandatory = false, HelpMessage = @"Specifies the description of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONBUILTINDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Description", Mandatory = false, HelpMessage = @"Specifies the description of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONCUSTOMDESIGN)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Classification", Mandatory = false, HelpMessage = @"Specifies the classification of the new site collection", ParameterSetName = ParameterSet_COMMUNICATIONBUILTINDESIGN)]
Expand All @@ -66,7 +66,7 @@ namespace SharePointPnP.PowerShell.Commands
[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)]
[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)]
[CmdletAdditionalParameter(ParameterType = typeof(string), ParameterName = "Title", Mandatory = true, HelpMessage = @"Specifies the title of the new site collection", ParameterSetName = ParameterSet_TEAM)]
[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)]
[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, this parameter only applies to Modern Team Sites", ParameterSetName = ParameterSet_TEAM)]
[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)]
Expand Down Expand Up @@ -227,4 +227,4 @@ public class TeamSiteParameters
}
}
}
#endif
#endif
22 changes: 10 additions & 12 deletions Commands/Base/ConnectOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,19 @@ public class ConnectOnline : PSCmdlet
#endif
public int RetryWait = 1;

[Parameter(Mandatory = false, ParameterSetName = ParameterSet_MAIN, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOKEN, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_WEBLOGIN, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_MAIN, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOKEN, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_WEBLOGIN, HelpMessage = "The request timeout. Default is 1800000")]
#if !ONPREMISES
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_NATIVEAAD, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAAD, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAADPEM, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_SPOMANAGEMENT, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_ACCESSTOKEN, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_NATIVEAAD, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAAD, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAADPEM, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_SPOMANAGEMENT, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_ACCESSTOKEN, HelpMessage = "The request timeout. Default is 1800000")]
#endif
#if ONPREMISES
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_HIGHTRUST_CERT, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_HIGHTRUST_PFX, HelpMessage = "The request timeout. Default is 180000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_HIGHTRUST_CERT, HelpMessage = "The request timeout. Default is 1800000")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_HIGHTRUST_PFX, HelpMessage = "The request timeout. Default is 1800000")]
#endif
public int RequestTimeout = 1800000;

Expand Down Expand Up @@ -327,7 +327,6 @@ public class ConnectOnline : PSCmdlet
* Invite guest users to the organization
* Read and write all groups
* Read and write directory data
* Access the directory as you
* Read and write identity providers
* Access the directory as you")]
public SwitchParameter PnPO365ManagementShell;
Expand All @@ -344,7 +343,6 @@ public class ConnectOnline : PSCmdlet
* Invite guest users to the organization
* Read and write all groups
* Read and write directory data
* Access the directory as you
* Read and write identity providers
* Access the directory as you
")]
Expand Down
2 changes: 1 addition & 1 deletion Commands/Base/EnablePowerShellTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override void ProcessRecord()
var telemetryFile = System.IO.Path.Combine(userFolder, ".pnppowershelltelemetry");
if (Force || ShouldContinue("Do you want to enable telemetry for PnP PowerShell?", "Confirm"))
{
SPOnlineConnection.CurrentConnection?.InitializeTelemetry(SPOnlineConnection.CurrentConnection.Context, Host);
SPOnlineConnection.CurrentConnection?.InitializeTelemetry(SPOnlineConnection.CurrentConnection.Context, Host, SPOnlineConnection.CurrentConnection.InitializationType);
System.IO.File.WriteAllText(telemetryFile, "allow");
WriteObject("Telemetry enabled");
}
Expand Down
3 changes: 1 addition & 2 deletions Commands/Base/GetAzureCertificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ protected override void ProcessRecord()
{
CertificatePath = Path.Combine(SessionState.Path.CurrentFileSystemLocation.Path, CertificatePath);
}

var certificate = new X509Certificate2(CertificatePath, CertificatePassword, X509KeyStorageFlags.Exportable);
var certificate = new X509Certificate2(CertificatePath, CertificatePassword, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet);
var rawCert = certificate.GetRawCertData();
var base64Cert = Convert.ToBase64String(rawCert);
var rawCertHash = certificate.GetCertHash();
Expand Down
4 changes: 2 additions & 2 deletions Commands/Base/GetHealthScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace SharePointPnP.PowerShell.Commands.Base
{
[Cmdlet(VerbsCommon.Get, "PnPHealthScore")]
[CmdletHelp("Retrieves the healthscore",
"Retrieves the current health score value of the server which is a value between 0 and 10. Lower is better.",
[CmdletHelp("Retrieves the healthscore value.",
"Retrieves the current X-SharePointHealthScore value of the server, or CPU, on which your SharePoint instance runs. X-SharePointHealthScore is a value between 0 and 10, where 0 indicates the server is idle and 10 indicates the server is very busy. For more information visit https://docs.microsoft.com/office365/enterprise/diagnosing-performance-issues-with-sharepoint-online and https://docs.microsoft.com/openspecs/sharepoint_protocols/ms-wsshp/c60ddeb6-4113-4a73-9e97-26b5c3907d33.",
Category = CmdletHelpCategory.Base,
OutputType=typeof(int),
OutputTypeDescription = "Returns a int value representing the current health score value of the server.")]
Expand Down
Loading

0 comments on commit fc5b2ac

Please sign in to comment.