Add PowerShell Script for Resizing and Reclaiming for W365 IT Copilot#38
Merged
bingqiangxiang merged 1 commit intomainfrom Jul 2, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds PowerShell automation for resizing and reclaiming Windows 365 Cloud PC licenses, along with sample data and documentation.
- Introduces a sample CSV for license management.
- Adds
README.mdwith usage examples and step-by-step screenshots. - Implements
CloudPcModelclass,LicenseManagement.psm1, andHelper.psm1modules with commands for bulk operations.
Reviewed Changes
Copilot reviewed 5 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| SampleData/SampleDataForLicenseManagement.CSV | Added sample records but one row is missing expected fields |
| README.md | New documentation with usage examples and images |
| Model/CloudPcModel.psm1 | Added CloudPcModel class definition |
| LicenseManagement.psm1 | Added Reclaim-CloudPCs and Manage-EntraGroupForResize functions with prompts and Graph API calls |
| Helper.psm1 | Added helper routines for Graph configuration and group/license management |
Comments suppressed due to low confidence (5)
Windows365ITCopilot/Helper.psm1:128
- The .PARAMETER tag names 'CloudPC' but the function parameter is 'CloudPCBasedUrl'. Update the doc to match the actual parameter name.
.PARAMETER CloudPC
Windows365ITCopilot/Helper.psm1:599
- Documentation lists 'UseDefaultName' as a parameter, but it isn't defined in the function signature. Remove or correct this entry.
.PARAMETER UseDefaultName
Windows365ITCopilot/LicenseManagement.psm1:25
- [nitpick] This new function currently has no associated unit or integration tests. Consider adding tests to validate its behavior.
function Reclaim-CloudPCs {
Windows365ITCopilot/LicenseManagement.psm1:77
- The nested double quotes inside the Read-Host string will break the prompt. Escape the inner quotes or switch to a single-quoted string.
$IsUserConsent = Read-Host "`nAre you sure you want to continue? [Y] Yes [N] No (default is "N")"
Windows365ITCopilot/LicenseManagement.psm1:177
- Same quoting issue here: the inner double quotes break the string literal. Use escaped quotes or single-quoted string.
$IsUserConsent = Read-Host "`nAre you sure you want to continue? [Y] Yes [N] No (default is "N"): "
kennywangms
approved these changes
Jul 2, 2025
kennywangms
approved these changes
Jul 2, 2025
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.
No description provided.