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 #1873 from SharePoint/dev
Browse files Browse the repository at this point in the history
February 2019 Release
  • Loading branch information
erwinvanhunen authored Feb 8, 2019
2 parents 271dc09 + 019d3e1 commit 1d485fd
Show file tree
Hide file tree
Showing 59 changed files with 2,652 additions and 140 deletions.
Binary file modified Binaries/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
Binary file modified Binaries/release/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
88 changes: 86 additions & 2 deletions Binaries/release/SharePointPnP.Modernization.Framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@ 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.6.1902.0]

### Added
- Added initial support for SharePoint 2019
- Added Clear-PnPDefaultColumnValues cmdlet
- Added Remove-PnPSearchConfiguration cmdlet
- Added Export-PnPClientSidePage to export a page to a Provisioning Template
- Added Add-PnPSiteDesignTask to apply a site design to a site. Intended as a replacement for Invoke-PnPSiteDesign as it the task can handle more than 30 actions.
- Added Get-PnPSiteDesignRun to retrieve the list of site designs applied to a site collection
- Added Get-PnPSiteDesignRunStatus to retrieve a list of all site script actions executed for a specified site design applied to a site
- Added Get-PnPSiteDesignTask to retrieve a list of all currently scheduled site design tasks.
- Added Remove-PnPSiteDesignTask to remove a previously scheduled site design task.
- Added -IncludeHiddenLists to Get-PnPProvisioningTemplate to optionally also extract hidden lists in a template.
- Added -HubSiteId to New-PnPSite to associate the site with a hubsite at creation time
- Added -Owners to New-PnPSite to set the owners while creating a modern team site.

### Changed
- Set-PnPDefaultColumnValues: Fixed character encoding issue on folders #1706
- Fixed import of search configuration to tenant via string
- Set-PnPTenantSite: Added support for setting default sharing and sharing permissions
- ConvertTo-PnPClientSidePage: Added support for copying page metadata to the modern version of the page + parameter to clear the transformation cache
- Enable-PnPTelemetry and Disable-PnPTelemetry do not require a connection anymore.
- Return more friendly exception if App Catalog does not exist when using Set-PnPStorageEntity, Get-PnPStorageEntity or Remove-PnPStorageEntity
- Added -SystemUpdate flag to Set-PnPListItemPermission
- Clean up temp data when using PEM string certificates, and support password on PEM string certificates.
- Updated Set-PnPGroup to update both the Notes -and- the Description of a SharePoint group if using the -Description parameter

### Contributors
- Koen Zomers (KoenZomers)
- Gautam Sheth (gautamdsheth)

## [3.5.1901.0]

### Added
Expand Down
11 changes: 9 additions & 2 deletions Commands/Admin/GetStorageEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ protected override void ExecuteCmdlet()
if (Scope == StorageEntityScope.Tenant)
{
var appCatalogUri = ClientContext.Web.GetAppCatalog();
using (var clonedContext = ClientContext.Clone(appCatalogUri))
if(appCatalogUri != null)
{
storageEntitiesIndex = clonedContext.Web.GetPropertyBagValueString("storageentitiesindex", "");
using (var clonedContext = ClientContext.Clone(appCatalogUri))
{
storageEntitiesIndex = clonedContext.Web.GetPropertyBagValueString("storageentitiesindex", "");
}
}
else
{
WriteWarning("Tenant app catalog is not available on this tenant.");
}
}
else
{
Expand Down
14 changes: 13 additions & 1 deletion Commands/Admin/NewSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
}
}
}
Expand Down
16 changes: 12 additions & 4 deletions Commands/Admin/RemoveStorageEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,20 @@ protected override void ExecuteCmdlet()
if (Scope == StorageEntityScope.Tenant)
{
var appCatalogUri = ClientContext.Web.GetAppCatalog();
using (var clonedContext = ClientContext.Clone(appCatalogUri))
if(appCatalogUri != null)
{
clonedContext.Web.RemoveStorageEntity(Key);
clonedContext.ExecuteQueryRetry();
using (var clonedContext = ClientContext.Clone(appCatalogUri))
{
clonedContext.Web.RemoveStorageEntity(Key);
clonedContext.ExecuteQueryRetry();
}
}
} else
else
{
WriteWarning("Tenant app catalog is not available on this tenant.");
}
}
else
{
var appcatalog = ClientContext.Site.RootWeb.SiteCollectionAppCatalog;
ClientContext.Load(appcatalog);
Expand Down
7 changes: 7 additions & 0 deletions Commands/Admin/SetHubSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public class SetHubSite : PnPAdminCmdlet
[Parameter(Mandatory = false)]
public string Description { get; set; }

[Parameter(Mandatory = false)]
public GuidPipeBind SiteDesignId;

protected override void ExecuteCmdlet()
{
var hubSiteProperties = base.Tenant.GetHubSitePropertiesByUrl(this.Identity.Url);
Expand All @@ -46,6 +49,10 @@ protected override void ExecuteCmdlet()
{
hubSiteProperties.Description = this.Description;
}
if (MyInvocation.BoundParameters.ContainsKey("SiteDesignId"))
{
hubSiteProperties.SiteDesignId = this.SiteDesignId.Id;
}
hubSiteProperties.Update();
ClientContext.ExecuteQueryRetry();
}
Expand Down
13 changes: 10 additions & 3 deletions Commands/Admin/SetStorageEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ protected override void ExecuteCmdlet()
if (Scope == StorageEntityScope.Tenant)
{
var appCatalogUri = ClientContext.Web.GetAppCatalog();
using (var clonedContext = ClientContext.Clone(appCatalogUri))
if(appCatalogUri != null)
{
clonedContext.Web.SetStorageEntity(Key, Value, Description, Comment);
clonedContext.ExecuteQueryRetry();
using (var clonedContext = ClientContext.Clone(appCatalogUri))
{
clonedContext.Web.SetStorageEntity(Key, Value, Description, Comment);
clonedContext.ExecuteQueryRetry();
}
}
else
{
WriteWarning("Tenant app catalog is not available on this tenant.");
}
}
else
Expand Down
Loading

0 comments on commit 1d485fd

Please sign in to comment.