Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Updated Set-PnPFileCheckedIn to approve the file

### Deprecated
- [SharePoint Online Only] Deprecated Get-PnPAppInstance, Import-PnPAppPackage, Uninstall-PnPAppPackage. Use Add-PnPApp, Install-PnPApp, Publish-PnPApp, Uninstall-PnPApp, Remove-PnPApp instead where applicable.
- Deprecated Load-PnPProvisioningTemplate, renaming it to Read-PnPProvisioningTemplate which follows the PowerShell approved verb standard. Load-PnPProvisioningTemplate has been added as an alias for Read-PnPProvisioningTemplate.
- Deprecated Execute-PnPQuery, renaming it to Invoke-PnPQuery which follows the PowerShell approved verb standard. Execute-PnPQuery has been added as an alias for Invoke-PnPQuery.
- Deprecated Ensure-PnPFolder, moving functionality to Resolve-PnPFolder which follows the PowerShell approved verb standard. Ensure-PnPFolder has been added as an alias for Resolve-PnPFolder.
- Documentation/Markdown generation has been removed from build, now points to docs.microsoft.com
- Documentation/Markdown generation has been removed from build, now points to https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps
- Deprecated Remove-PnPNavigationNode -Title and -Header parameters. Use the Identity parameter instead.
- Marked -WebTemplate parameter on Get-PnPTenantSite as obsolete. Use -Template instead.
- Deprecated Get-PnPAzureADManifestKeyCredentials. Use Get-PnPAzureCertificate instead.
Expand Down
4 changes: 2 additions & 2 deletions Commands/Admin/GetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace SharePointPnP.PowerShell.Commands.Admin
SupportedPlatform = CmdletSupportedPlatform.Online,
Category = CmdletHelpCategory.TenantAdmin)]
[CmdletExample(
Code = @"PS:> Set-PnPTenantCdnPolicies -CdnType Public -PolicyType IncludeFileExtensions -PolicyValue ""CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF""",
Remarks = @"This example sets the IncludeFileExtensions policy to the specified value.", SortOrder = 1)]
Code = @"PS:> Get-PnPTenant",
Remarks = @"This example returns all tenant settings", SortOrder = 1)]
public class GetTenant : PnPAdminCmdlet
{
protected override void ExecuteCmdlet()
Expand Down
13 changes: 13 additions & 0 deletions Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ namespace SharePointPnP.PowerShell.Commands.Admin
You must be a SharePoint Online global administrator to run the cmdlet.",
SupportedPlatform = CmdletSupportedPlatform.Online,
Category = CmdletHelpCategory.TenantAdmin)]
[CmdletExample(
Code = @"PS:> Set-PnPTenantSite -Identity https://contoso.sharepoint.com/sites/team1 -LockState NoAccess
Set-PnPTenant -NoAcessRedirectUrl 'http://www.contoso.com'",
Remarks = @"This example blocks access to https://contoso.sharepoint.com/sites/team1 and redirects traffic to http://www.contoso.com.", SortOrder = 1)]
[CmdletExample(
Code = @"PS:> Set-PnPTenant -ShowEveryoneExceptExternalUsersClaim $false",
Remarks = @"This example hides the ""Everyone Except External Users"" claim in People Picker.", SortOrder = 2)]
[CmdletExample(
Code = @"PS:> Set-PnPTenant -ShowAllUsersClaim $false",
Remarks = @"This example hides the ""All Users"" claim group in People Picker.", SortOrder = 3)]
[CmdletExample(
Code = @"PS:> Set-SPOTenant -UsePersistentCookiesForExplorerView $true",
Remarks = @"This example enables the use of special persisted cookie for Open with Explorer.", SortOrder = 3)]
public class SetTenant : PnPAdminCmdlet
{
const string ParameterSet_COMPATIBILITYLEVEL = "Compabitility Level";
Expand Down
6 changes: 5 additions & 1 deletion Commands/Apps/GetAppInstance.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Microsoft.SharePoint.Client;
Expand All @@ -7,6 +8,9 @@

namespace SharePointPnP.PowerShell.Commands.Apps
{
#if !ONPREMISES
[Obsolete("Use Get-PnPApp instead")]
#endif
[Cmdlet(VerbsCommon.Get, "PnPAppInstance")]
[CmdletHelp("Returns a SharePoint AddIn Instance",
"Returns a SharePoint App/Addin that has been installed in the current site",
Expand Down
6 changes: 5 additions & 1 deletion Commands/Apps/ImportAppPackage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Globalization;
using System;
using System.Globalization;
using System.IO;
using System.Management.Automation;
using Microsoft.SharePoint.Client;
Expand All @@ -7,6 +8,9 @@

namespace SharePointPnP.PowerShell.Commands.Apps
{
#if!ONPREMISES
[Obsolete("Use Add-PnPApp, Install-PnPApp instead")]
#endif
[Cmdlet(VerbsData.Import, "PnPAppPackage")]
[CmdletHelp("Adds a SharePoint Addin to a site",
"This commands requires that you have an addin package to deploy",
Expand Down
6 changes: 5 additions & 1 deletion Commands/Apps/UninstallAppInstance.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using System.Management.Automation;
using System;
using System.Management.Automation;
using Microsoft.SharePoint.Client;
using SharePointPnP.PowerShell.CmdletHelpAttributes;
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;

namespace SharePointPnP.PowerShell.Commands.Apps
{
#if !ONPREMISES
[Obsolete("Use Uninstall-PnPApp instead")]
#endif
[Cmdlet(VerbsLifecycle.Uninstall, "PnPAppInstance", SupportsShouldProcess = true)]
[CmdletHelp("Removes an app from a site",
"Removes an add-in/app that has been installed to a site.",
Expand Down
4 changes: 2 additions & 2 deletions Commands/Base/ConnectOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ namespace SharePointPnP.PowerShell.Commands.Base
SortOrder = 5)]
[CmdletExample(
Code = @"PS:> Connect-PnPOnline -Url https://yourserver -Credentials (Get-Credential) -CreateDrive
cd SPO:\\
dir",
PS:> cd SPO:\\
PS:> dir",
Remarks = @"This will prompt you for credentials and creates a context for the other PowerShell commands to use. It will also create a SPO:\\ drive you can use to navigate around the site",
SortOrder = 6)]
[CmdletExample(
Expand Down
4 changes: 3 additions & 1 deletion Commands/Model/SPOPublicCdnOrigin.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if !ONPREMISES
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -19,3 +20,4 @@ public SPOPublicCdnOrigin(string id, string url)
}
}
}
#endif
4 changes: 3 additions & 1 deletion Commands/Model/SPOTenant.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Online.SharePoint.TenantAdministration;
#if !ONPREMISES
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.Online.SharePoint.TenantManagement;
using Microsoft.SharePoint.Client;
using System;
Expand Down Expand Up @@ -591,3 +592,4 @@ public SPOTenant(Tenant tenant)
private int emailAttestationReAuthDays;
}
}
#endif