Add Get-PnPUserAndContentMoveState cmdlet and related model for user and content move state retrieval#5338
Merged
Merged
Conversation
…and content move state retrieval
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new SharePoint Online multi-geo admin cmdlet for retrieving user and OneDrive content move job state, backed by new REST client methods and a response model.
Changes:
- Added
Get-PnPUserAndContentMoveStatecmdlet with lookup by UPN, lookup by move ID, and move report modes. - Added REST API support and model/enums for user/content move state responses.
- Added cmdlet documentation and changelog entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Commands/Admin/GetUserAndContentMoveState.cs |
Implements the new admin cmdlet and output shaping. |
src/Commands/Utilities/MultiGeo/MultiGeoRestApiClient.cs |
Adds REST paths/methods for user/content move state retrieval. |
src/Commands/Model/UserAndContentMoveState.cs |
Adds the response model and related enum types. |
documentation/Get-PnPUserAndContentMoveState.md |
Documents syntax, examples, parameters, and outputs. |
CHANGELOG.md |
Adds the new cmdlet to the current nightly changelog. |
| protected override void ExecuteCmdlet() | ||
| { | ||
| var multiGeoRestApiClient = new MultiGeoRestApiClient(AdminContext); | ||
| var includeVerboseProperties = IsVerboseMode(); |
| private const string UserMoveJobsReportApiVersion = "1.3.2"; | ||
| private const string UserMoveJobPathByUpn = "UserMoveJobs(upn='{0}')"; | ||
| private const string UserMoveJobPathByMoveId = "UserMoveJobs/GetByMoveId(odbMoveId='{0}')"; | ||
| private const string UserMoveJobsPathForMoveReport = "UserMoveJobs/GetMoveReport(moveState={0},moveDirection={1},startTime='{2:u}',endTime='{3:u}',limit='{4}')"; |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type
Related Issues?
NA
What is in this Pull Request ?
Added Get-PnPUserAndContentMoveState cmdlet and related docs