Skip to content

Conversation

@ojopiyo
Copy link
Contributor

@ojopiyo ojopiyo commented Dec 11, 2025

  1. Modular Functions - Get-AllUsersFromUPA, Get-DisabledUsersFromGraph, and Validate-SiteUsers encapsulate logic for clarity and reusability.

  2. Readable Loops - Flattened loops and replaced nested if logic with clear conditions.

  3. Pipeline-Friendly - Uses ForEach-Object and -contains for clean collection handling.

  4. Error Handling - Each user retrieval is wrapped in try/catch to prevent the script from stopping.

  5. Color-Coded Output - Yellow for warnings, Red for errors, Green for completion.

  6. Easy to Extend - Adding additional validation rules is straightforward within Validate-SiteUsers.

ojopiyo and others added 2 commits December 11, 2025 21:44
1. Modular Functions -  Get-AllUsersFromUPA, Get-DisabledUsersFromGraph, and Validate-SiteUsers encapsulate logic for clarity and reusability.

2. Readable Loops - Flattened loops and replaced nested if logic with clear conditions.

3. Pipeline-Friendly - Uses ForEach-Object and -contains for clean collection handling.

4. Error Handling - Each user retrieval is wrapped in try/catch to prevent the script from stopping.

5. Color-Coded Output - Yellow for warnings, Red for errors, Green for completion.

6. Easy to Extend - Adding additional validation rules is straightforward within Validate-SiteUsers.
@pkbullock pkbullock merged commit b54bdbb into pnp:main Dec 18, 2025
@pkbullock
Copy link
Collaborator

Thank you again @ojopiyo for a third great update - this will be live shortly 👏🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants