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 #2616 from pnp/dev
April 2020 Release
- Loading branch information
Showing
61 changed files
with
1,894 additions
and
587 deletions.
There are no files selected for viewing
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, "PnPKnowledgeHubSite")] | ||
[CmdletHelp("Gets the Knowledge Hub Site URL for your tenant", | ||
SupportedPlatform = CmdletSupportedPlatform.Online, | ||
Category = CmdletHelpCategory.TenantAdmin)] | ||
[CmdletExample( | ||
Code = @"PS:> Get-PnPKnowledgeHubSite", | ||
Remarks = @"Returns the Knowledge Hub Site Url for your tenant", SortOrder = 1)] | ||
public class GetKnowledgeHubSite : PnPAdminCmdlet | ||
{ | ||
protected override void ExecuteCmdlet() | ||
{ | ||
var results = Tenant.GetKnowledgeHubSite(); | ||
Tenant.Context.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
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
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,37 @@ | ||
#if !ONPREMISES | ||
using Microsoft.SharePoint.Client; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Apps | ||
{ | ||
[Cmdlet(VerbsLifecycle.Register, "PnPAppCatalogSite")] | ||
[CmdletHelp("Creates a new App Catalog Site and sets this site as the Tenant App Catalog", | ||
Category = CmdletHelpCategory.TenantAdmin, SupportedPlatform = CmdletSupportedPlatform.Online)] | ||
[CmdletExample( | ||
Code = @"PS:> Register-PnPAppCatalogSite -Url https://yourtenant.sharepoint.com/sites/appcatalog -Owner admin@domain.com -TimeZoneId 4", | ||
Remarks = @"This will create a new appcatalog site if no app catalog is already present. Use -Force to create a new appcatalog site if one has already been registered. If using the same URL as an existing one and Force is present, the current/existing appcatalog site will be deleted.", SortOrder = 1)] | ||
public class RegisterAppCatalogSite : PnPAdminCmdlet | ||
{ | ||
|
||
[Parameter(Mandatory = true, HelpMessage = "The full url of the app catalog site to be created, e.g. https://yourtenant.sharepoint.com/sites/appcatalog")] | ||
public string Url; | ||
|
||
[Parameter(Mandatory = true, HelpMessage = "The login account of the user designated to be the admin for the site, e.g. user@domain.com")] | ||
public string Owner; | ||
|
||
[Parameter(Mandatory = true, HelpMessage = "Use Get-PnPTimeZoneId to retrieve possible timezone values")] | ||
public int TimeZoneId; | ||
|
||
[Parameter(Mandatory = false, HelpMessage ="If specified, and an app catalog is already present, a new app catalog site will be created. If the same URL is used the existing/current app catalog site will be deleted first.")] | ||
public SwitchParameter Force; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
WriteWarning("Notice that this cmdlet can take considerate time to finish executing."); | ||
Tenant.EnsureAppCatalogAsync(Url, Owner, TimeZoneId, Force).GetAwaiter().GetResult(); | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.