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

Added notice to Get-Help of PnPAdminCmdlets #2751

Merged
merged 4 commits into from Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Changed
- Fixed issue where using `Disconnect-PnPOnline -Connection $variable` after having connected using `$variable = Connect-PnPOnline -CertificatePath <path> -ReturnConnection`, it would not clean up the certificate on that connection instance passed in by $variable, but instead try to do it on the current connection context [PR #2755](https://github.com/pnp/PnP-PowerShell/pull/2755)
- If a certain PnP PowerShell cmdlet needs access to the SharePoint Admin Center site in order to function correctly, it will now list this in the Synopsis section of the Get-Help for the cmdlet
- Fixed issue where using `Connect-PnPOnline` using `-Thumbnail` would delete the private key on some devices when running `Disconnect-PnPOnline` [PR #2759](https://github.com/pnp/PnP-PowerShell/pull/2759)

### Contributors
Expand Down
5 changes: 2 additions & 3 deletions Commands/Admin/AddSiteCollectionAppCatalog.cs
Expand Up @@ -4,9 +4,7 @@
using SharePointPnP.PowerShell.CmdletHelpAttributes;
using SharePointPnP.PowerShell.Commands.Base;
using System.Management.Automation;
using OfficeDevPnP.Core.Sites;
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
using System;

namespace SharePointPnP.PowerShell.Commands.Admin
{
Expand All @@ -17,7 +15,8 @@ namespace SharePointPnP.PowerShell.Commands.Admin
[CmdletExample(
Code = @"PS:> Add-PnPSiteCollectionAppCatalog -Site ""https://contoso.sharepoint.com/sites/FinanceTeamsite""",
Remarks = @"This will add a SiteCollection app catalog to the specified site", SortOrder = 1)]
public class AddSiteCollectionAppCatalog: PnPAdminCmdlet
[CmdletRelatedLink(Text = "Documentation", Url = "https://docs.microsoft.com/sharepoint/dev/general-development/site-collection-app-catalog#configure-and-manage-site-collection-app-catalogs")]
public class AddSiteCollectionAppCatalog : PnPAdminCmdlet
{
[Parameter(Mandatory = true, HelpMessage = @"Url of the site to add the app catalog to.")]
public SitePipeBind Site;
Expand Down
6 changes: 6 additions & 0 deletions ModuleFilesGenerator/HelpFileGenerator.cs
Expand Up @@ -130,6 +130,12 @@ private XElement GetCommandElement(Model.CmdletInfo cmdletInfo)
additionalDescriptionInfo.AppendLine();
}

// Notice if the cmdlet is a PnPAdminCmdlet that access to the SharePoint Tenant Admin site is needed
if (cmdletInfo.CmdletType.BaseType.Name.Equals("PnPAdminCmdlet"))
{
additionalDescriptionInfo.AppendLine("* Required SharePoint permissions: Access to the SharePoint Tenant Administration site");
}

// Validate if additional information should be prepended to the description
if (additionalDescriptionInfo.Length > 0)
{
Expand Down