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

Commit

Permalink
Merge pull request #1770 from KoenZomers/IncludeModernDeletedSites
Browse files Browse the repository at this point in the history
Get-PnPTenantRecycleBinItem to also include modern sites
  • Loading branch information
erwinvanhunen authored Nov 9, 2018
2 parents 01e38c4 + 308ed48 commit d274a70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Commands/RecycleBin/GetTenantRecycleBinItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
namespace SharePointPnP.PowerShell.Commands.RecycleBin
{
[Cmdlet(VerbsCommon.Get, "PnPTenantRecycleBinItem", DefaultParameterSetName = "All")]
[CmdletHelp("Returns the items in the tenant scoped recycle bin",
[CmdletHelp("Returns all modern and classic site collections in the tenant scoped recycle bin",
DetailedDescription = "This command will return all the items in the tenant recycle bin for the Office 365 tenant you are connected to. Be sure to connect to the SharePoint Online Admin endpoint (https://yourtenantname-admin.sharepoint.com) in order for this command to work.",
Category = CmdletHelpCategory.RecycleBin,
SupportedPlatform = CmdletSupportedPlatform.Online,
OutputType = typeof(DeletedSiteProperties),
OutputTypeLink = "https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.deletedsiteproperties.aspx")]
[CmdletExample(
Code = @"PS:> Get-PnPTenantRecycleBinItem",
Remarks = "Returns all site collections in the tenant scoped recycle bin",
Remarks = "Returns all modern and classic site collections in the tenant scoped recycle bin",
SortOrder = 1)]
public class GetTenantRecycleBinItems : PnPAdminCmdlet
{
protected override void ExecuteCmdlet()
{
var deletedSites = Tenant.GetDeletedSiteProperties(0);
var deletedSites = Tenant.GetDeletedSitePropertiesFromSharePoint("0");
ClientContext.Load(deletedSites, c => c.IncludeWithDefaultProperties(s => s.Url, s => s.SiteId, s => s.DaysRemaining, s => s.Status));
ClientContext.ExecuteQueryRetry();
if (deletedSites.AreItemsAvailable)
Expand Down

0 comments on commit d274a70

Please sign in to comment.