Improve version handling in Test-CIPPAPIModuleUpdate function - #90
Conversation
Dev to Main
…checks for valid version information and enhanced error handling for multiple local installs. Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
This PR refines how Test-CIPPAPIModuleUpdate determines the local module version by tolerating multiple returned install records and skipping invalid version values, and it adds warnings when older side-by-side installs are detected.
Changes:
- Aggregates and parses multiple local version candidates, selecting the highest valid version for comparison.
- Skips invalid/missing local version values rather than failing the update check.
- Emits warnings when older local installs (lower versions) are detected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Name variable in verbose log
Copilot Review Feedback - ResolvedIssue 1: Dead code - unused Issue 2: Hard-coded module name in verbose message Commit: Apply Copilot PR review feedback: remove dead variable and use ModuleName variable in verbose log |
|
Heya Mikey, thanks for another PR! |
…ilot feedback fixes
Rebased :-) |
|
Actioned remaining Copilot feedback. |
|
I might be missing something, but isnt this pretty much just stripping out the try/catch safety? |
…support for multiple local installs, improved version validation, and updated warning messages for outdated installations.
…ate function. Removed uniqueness constraint in sorting to ensure all paths are reported for the same version.
|
Looks good, thanks for the PR! |

Enhance version checks and error handling for multiple local installs in the Test-CIPPAPIModuleUpdate function. Ensure valid version information is processed and provide warnings for outdated installations.