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 662
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 #2442 from SharePoint/dev
January 2020 Release
- Loading branch information
Showing
92 changed files
with
2,314 additions
and
2,500 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
635 changes: 403 additions & 232 deletions
635
Binaries/release/SharePointPnP.Modernization.Framework.xml
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#if !ONPREMISES | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
using Microsoft.Online.SharePoint.TenantAdministration; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Add, "PnPOrgAssetsLibrary")] | ||
[CmdletHelp("Adds a given document library as a organizational asset source", | ||
DetailedDescription = @"Adds a given document library as an organizational asset source in your Sharepoint Online Tenant. All organizational asset sources you add must reside in the same site collection. Document libraries specified as organizational asset must be enabled as an Office 365 CDN source, either as private or public. It may take some time before this change will be reflected in the webinterface.", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos", | ||
Remarks = @"Adds the document library with the url ""logos"" located in the sitecollection at ""https://yourtenant.sharepoint.com/sites/branding"" as an organizational asset not specifying a thumbnail image for it and enabling the document library as a public Office 365 CDN source", SortOrder = 1)] | ||
[CmdletExample( | ||
Code = @"PS:> Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos -ThumbnailUrl https://yourtenant.sharepoint.com/sites/branding/logos/thumbnail.jpg", | ||
Remarks = @"Adds the document library with the url ""logos"" located in the sitecollection at ""https://yourtenant.sharepoint.com/sites/branding"" as an organizational asset specifying the thumbnail image ""thumbnail.jpg"" residing in the same document library for it and enabling the document library as a public Office 365 CDN source", SortOrder = 2)] | ||
[CmdletExample( | ||
Code = @"PS:> Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos -CdnType Private", | ||
Remarks = @"Adds the document library with the url ""logos"" located in the sitecollection at ""https://yourtenant.sharepoint.com/sites/branding"" as an organizational asset not specifying a thumbnail image for it and enabling the document library as a private Office 365 CDN source", SortOrder = 3)] | ||
public class AddOrgAssetsLibrary : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = true, HelpMessage = "The full url of the document library to be marked as one of organization's assets sources")] | ||
public string LibraryUrl; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = "The full url to an image that should be used as a thumbnail for showing this source. The image must reside in the same site as the document library you specify.")] | ||
public string ThumbnailUrl; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = @"Indicates what type of Office 365 CDN source the document library will be added to")] | ||
public SPOTenantCdnType CdnType = SPOTenantCdnType.Public; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
Tenant.AddToOrgAssetsLibAndCdn(CdnType, LibraryUrl, ThumbnailUrl); | ||
ClientContext.ExecuteQueryRetry(); | ||
} | ||
} | ||
} | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#if !ONPREMISES | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
using SharePointPnP.PowerShell.Commands.Base.PipeBinds; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Add, "PnPOrgNewsSite")] | ||
[CmdletHelp("Adds the site as an organization news source in your tenant", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Add-PnPOrgNewsSite -OrgNewsSiteUrl https://yourtenant.sharepoint.com/sites/news", | ||
Remarks = @"Adds the site as one of multiple possible tenant's organizational news sites", SortOrder = 1)] | ||
public class AddOrgNewsSite : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = true, HelpMessage = "The url of the site to be marked as one of organization's news sites")] | ||
public SitePipeBind OrgNewsSiteUrl; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
Tenant.SetOrgNewsSite(OrgNewsSiteUrl.Url); | ||
ClientContext.ExecuteQueryRetry(); | ||
} | ||
} | ||
} | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#if !ONPREMISES | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "PnPOrgAssetsLibrary")] | ||
[CmdletHelp("Returns the list of all the configured organizational asset libraries", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Get-PnPOrgAssetsLibrary", | ||
Remarks = @"Returns the list of all the configured organizational asset sites", SortOrder = 1)] | ||
[CmdletExample( | ||
Code = @"PS:> (Get-PnPOrgAssetsLibrary)[0].OrgAssetsLibraries[0].LibraryUrl.DecodedUrl", | ||
Remarks = @"Returns the server relative url of the first document library which has been flagged as organizational asset library, i.e. ""sites/branding/logos""", SortOrder = 2)] | ||
// | ||
public class GetOrgAssetsLibrary : PnPAdminCmdlet | ||
{ | ||
protected override void ExecuteCmdlet() | ||
{ | ||
var results = Tenant.GetOrgAssets(); | ||
ClientContext.ExecuteQueryRetry(); | ||
WriteObject(results.Value, true); | ||
} | ||
} | ||
} | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#if !ONPREMISES | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "PnPOrgNewsSite")] | ||
[CmdletHelp("Returns the list of all the configured organizational news sites.", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Get-PnPOrgNewsSite", | ||
Remarks = @"Returns the list of all the configured organizational news sites.", SortOrder = 1)] | ||
public class GetOrgNewsSite : PnPAdminCmdlet | ||
{ | ||
protected override void ExecuteCmdlet() | ||
{ | ||
var results = Tenant.GetOrgNewsSites(); | ||
ClientContext.ExecuteQueryRetry(); | ||
WriteObject(results, true); | ||
} | ||
} | ||
} | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#if !ONPREMISES | ||
using Microsoft.Online.SharePoint.TenantAdministration; | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Remove, "PnPOrgAssetsLibrary")] | ||
[CmdletHelp("Removes a given document library as a organizational asset source", | ||
DetailedDescription = @"Removes a given document library as a organizational asset source based on its server relative URL in your Sharepoint Online Tenant. It will not remove the document library itself. It may take some time before this change will be reflected in the webinterface.", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Remove-PnPOrgAssetsLibrary -LibraryUrl ""sites/branding/logos""", | ||
Remarks = @"This example removes the document library with the url ""logos"" residing in the sitecollection with the url ""sites/branding/logos"" from the list with organizational assets keeping it as an Office 365 CDN source", SortOrder = 1)] | ||
[CmdletExample( | ||
Code = @"PS:> Remove-PnPOrgAssetsLibrary -LibraryUrl ""sites/branding/logos"" -ShouldRemoveFromCdn $true", | ||
Remarks = @"This example removes the document library with the url ""logos"" residing in the sitecollection with the url ""sites/branding/logos"" from the list with organizational assets also removing it as a Public Office 365 CDN source", SortOrder = 2)] | ||
[CmdletExample( | ||
Code = @"PS:> Remove-PnPOrgAssetsLibrary -LibraryUrl ""sites/branding/logos"" -ShouldRemoveFromCdn $true -CdnType Private", | ||
Remarks = @"This example removes the document library with the url ""logos"" residing in the sitecollection with the url ""sites/branding/logos"" from the list with organizational assets also removing it as a Private Office 365 CDN source", SortOrder = 3)] | ||
public class RemoveOrgAssetsLibrary : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = true, HelpMessage = @"The server relative url of the document library flagged as organizational asset which you want to remove, i.e. ""sites/branding/logos""")] | ||
public string LibraryUrl; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = @"Boolean indicating if the document library that will no longer be flagged as an organizational asset also needs to be removed as an Office 365 CDN source")] | ||
public bool ShouldRemoveFromCdn = false; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = @"Indicates what type of Office 365 CDN source the document library that will no longer be flagged as an organizational asset was of")] | ||
public SPOTenantCdnType CdnType = SPOTenantCdnType.Public; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
Tenant.RemoveFromOrgAssetsAndCdn(ShouldRemoveFromCdn, CdnType, LibraryUrl); | ||
ClientContext.ExecuteQueryRetry(); | ||
} | ||
} | ||
} | ||
#endif |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#if !ONPREMISES | ||
using Microsoft.Online.SharePoint.TenantAdministration; | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
using SharePointPnP.PowerShell.Commands.Base.PipeBinds; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Admin | ||
{ | ||
[Cmdlet(VerbsCommon.Remove, "PnPOrgNewsSite")] | ||
[CmdletHelp("Removes a given site from the list of organizational news sites.", | ||
DetailedDescription = @"Removes a given site from the list of organizational news sites based on its URL in your Sharepoint Online Tenant.", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Remove-PnPOrgNewsSite -OrgNewsSiteUrl https://tenant.sharepoint.com/sites/mysite", | ||
Remarks = @"This example removes the specified site from list of organization's news sites.", SortOrder = 1)] | ||
public class RemoveOrgNewsSite : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = true, HelpMessage = @"The site to be removed from list of organization's news sites")] | ||
public SitePipeBind OrgNewsSiteUrl; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
Tenant.RemoveOrgNewsSite(OrgNewsSiteUrl.Url); | ||
ClientContext.ExecuteQueryRetry(); | ||
} | ||
} | ||
} | ||
#endif |
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.