-
Notifications
You must be signed in to change notification settings - Fork 383
Add Get-LargelistOperationStatus #3033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
eb53d99
Add Get-LargeListRemovalStatus cmd
lilealdai 6f92676
Merge https://github.com/lilealdai/powershell into largeListDeleteStatus
lilealdai b287593
Command working
lilealdai cf8a67f
Add documentation and rename LargelistOperationStatus
lilealdai 64a7f87
Rename LargeListRemovalStatus
lilealdai 5a0eee8
Merge branch 'dev' into largeListDeleteStatus
gautamdsheth 3655700
Rename to Get-PnPLargeListOperationStatus
lilealdai 5aab67b
Merge branch 'pnp:dev' into largeListDeleteStatus
lilealdai d21f888
Merge https://github.com/lilealdai/powershell into largeListDeleteStatus
lilealdai e3390f0
Merge branch 'largeListDeleteStatus' of https://github.com/lilealdai/…
lilealdai 89061bd
Update documentatuib
lilealdai 14df9de
Merge branch 'dev' into largeListDeleteStatus
gautamdsheth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,78 @@ | ||
--- | ||
Module Name: PnP.PowerShell | ||
title: Get-PnPLargeListOperationStatus | ||
schema: 2.0.0 | ||
applicable: SharePoint Online | ||
external help file: PnP.PowerShell.dll-Help.xml | ||
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPLargeListOperationStatus.html | ||
--- | ||
|
||
# Get-PnPLargeListOperationStatus | ||
|
||
## SYNOPSIS | ||
Get the status of a large list operation. Currently supports Large List Removal Operation. | ||
|
||
## SYNTAX | ||
|
||
```powershell | ||
Get-PnPLargeListOperationStatus [-ListId] <ListId> [-OperationId] <OperationId> [-Connection <PnPConnection>] | ||
``` | ||
|
||
## DESCRIPTION | ||
|
||
Allows to get the status of a large list operation. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
```powershell | ||
Get-PnPLargeListOperationStatus -ListId 9ea5d197-2227-4156-9ae1-725d74dc029d -OperationId 924e6a34-5c90-4d0d-8083-2efc6d1cf481 | ||
``` | ||
|
||
## PARAMETERS | ||
|
||
### -ListId | ||
ListId/Guid of the list. Retrieve the value for this parameter from the output of the Large List Operation Command. | ||
|
||
```yaml | ||
Type: Guid | ||
Parameter Sets: (All) | ||
|
||
Required: True | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: True (ByValue) | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### -OperationId | ||
OperationId/Guid of the Large List Operation. Retrieve the value for this parameter from the output of the Large List Operation Command. | ||
|
||
```yaml | ||
Type: Guid | ||
Parameter Sets: (All) | ||
|
||
Required: True | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: True (ByValue) | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### -Connection | ||
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection. | ||
|
||
```yaml | ||
Type: PnPConnection | ||
Parameter Sets: (All) | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
## RELATED LINKS | ||
|
||
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) |
This file contains hidden or 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 hidden or 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 @@ | ||
using System; | ||
using System.Management.Automation; | ||
|
||
using Microsoft.SharePoint.Client; | ||
|
||
using PnP.PowerShell.Commands.Base.PipeBinds; | ||
using PnP.PowerShell.Commands.Model.SharePoint; | ||
|
||
namespace PnP.PowerShell.Commands.Lists | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "PnPLargeListOperationStatus")] | ||
public class GetLargeListOperationStatus : PnPWebCmdlet | ||
{ | ||
[Parameter(Mandatory = true)] | ||
public Guid ListId; | ||
|
||
[Parameter(Mandatory = true)] | ||
public Guid OperationId; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
var operation = ClientContext.Web.GetListOperation(ListId, OperationId); | ||
ClientContext.Load(operation); | ||
ClientContext.ExecuteQueryRetry(); | ||
WriteObject(new RecycleBinLargeOperationResult { RecycleBinLargeOperationType = operation.OperationType, RecycleBinLargeOperationResourceLocation = operation.ResourceLocation, RecycleBinLargeOperationStatus = operation.Status, RecycleBinLargeOperationProgressPercentage = operation.ProgressPercentage}); | ||
} | ||
} | ||
} |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.