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 665
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 #2006 from SharePoint/dev
April 2019 Release
- Loading branch information
Showing
42 changed files
with
4,117 additions
and
1,014 deletions.
There are no files selected for viewing
Binary file not shown.
1,709 changes: 1,350 additions & 359 deletions
1,709
Binaries/SharePointPnP.Modernization.Framework.xml
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
1,709 changes: 1,350 additions & 359 deletions
1,709
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
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, "PnPHomeSite")] | ||
[CmdletHelp("Returns the home site url for your tenant", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Get-PnPHomeSite", | ||
Remarks = @"Returns the home site url for your tenant", SortOrder = 1)] | ||
public class GetHomeSite : PnPAdminCmdlet | ||
{ | ||
protected override void ExecuteCmdlet() | ||
{ | ||
var results = Tenant.GetSPHSiteUrl(); | ||
ClientContext.ExecuteQueryRetry(); | ||
WriteObject(results.Value); | ||
} | ||
} | ||
} | ||
#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,40 @@ | ||
#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.Remove, "PnPHomeSite")] | ||
[CmdletHelp("Removes the currently set site as the home site", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Remove-PnPHomeSite", | ||
Remarks = @"Removes the currently set site as the home site", SortOrder = 1)] | ||
public class RemoveHomeSite : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = false, HelpMessage = "Specifying the Force parameter will skip the confirmation question.")] | ||
public SwitchParameter Force; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
var homesiteUrl = Tenant.GetSPHSiteUrl(); | ||
ClientContext.ExecuteQueryRetry(); | ||
if (!string.IsNullOrEmpty(homesiteUrl.Value)) | ||
{ | ||
if (Force || ShouldContinue($"Remove {homesiteUrl.Value} as the home site?", Properties.Resources.Confirm)) | ||
{ | ||
Tenant.RemoveSPHSite(); | ||
ClientContext.ExecuteQueryRetry(); | ||
} | ||
} | ||
else | ||
{ | ||
WriteWarning("There is currently not site collection set as a home site in your tenant."); | ||
} | ||
} | ||
} | ||
} | ||
#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,28 @@ | ||
#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.Set, "PnPHomeSite")] | ||
[CmdletHelp("Sets the home site for your tenant", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Set-PnPHomeSite -Url https://yourtenant.sharepoint.com/sites/myhome", | ||
Remarks = @"Sets the home site to the provided site collection url", SortOrder = 1)] | ||
public class SetHomeSite : PnPAdminCmdlet | ||
{ | ||
[Parameter(Mandatory = true, HelpMessage = "The url of the site to set as the home site")] | ||
public string Url; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
Tenant.SetSPHSite(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,38 @@ | ||
#if !ONPREMISES | ||
using OfficeDevPnP.Core.Enums; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base.PipeBinds; | ||
using System; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Apps | ||
{ | ||
[Cmdlet(VerbsData.Sync, "PnPAppToTeams")] | ||
[CmdletHelp("Synchronize an app from the tenant app catalog to the Microsoft Teams app catalog", SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.Apps)] | ||
[CmdletExample( | ||
Code = @"PS:> Sync-PnPAppToTeams -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe", | ||
Remarks = @"This will synchronize the given app with the Microsoft Teams app catalog", SortOrder = 1)] | ||
public class SyncAppToTeams : PnPCmdlet | ||
{ | ||
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, HelpMessage = "Specifies the Id of the Addin Instance")] | ||
public AppMetadataPipeBind Identity; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
var manager = new OfficeDevPnP.Core.ALM.AppManager(ClientContext); | ||
|
||
var app = Identity.GetAppMetadata(ClientContext, AppCatalogScope.Tenant); | ||
|
||
if (app != null) | ||
{ | ||
manager.SyncToTeams(app); | ||
} | ||
else | ||
{ | ||
throw new Exception("Cannot find app"); | ||
} | ||
} | ||
} | ||
} | ||
#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.