Skip to content

Conversation

Copy link

Copilot AI commented Jan 16, 2026

This PR documents the investigation into supporting multiple input parameters for scripted alerts.

Findings

The system already supports passing multiple input parameters through the existing $input parameter mechanism in alert functions. No code changes were needed.

Original Approach (Reverted)

Initially attempted to add explicit typed parameters to alert functions, but this was unnecessary as:

  • The existing $input parameter (aliased from InputValue) already handles multiple configuration values as properties of an object
  • The parameter filtering in Push-ExecScheduledCommand.ps1 (lines 152-165) already supports passing any parameters through PowerShell's parameter discovery and splatting
  • Alert functions can already accept complex objects with multiple properties via the $input parameter

Current Usage

Multiple input parameters are already supported by passing them as properties in the $input object:

Get-CIPPAlertExpiringLicenses -InputValue @{ 
    ExpiringLicensesDays = 30
    ExpiringLicensesUnassignedOnly = $true 
}

The timer infrastructure (Push-ExecScheduledCommand.ps1) converts parameters from JSON and splats them to alert functions, which can access multiple configuration values through the $input parameter.

Conclusion

No changes required - the functionality already exists in the current implementation.

Original prompt

can you please follow the clode flow the the timer that starts the scripted alerts and understand what needs to be chnaged for them to support more than the current 1 input object so scripts can have multiple inputs not just the 1 aliased input.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 16, 2026 00:53
- Updated Get-CIPPAlertExpiringLicenses to accept direct parameters (ExpiringLicensesDays, ExpiringLicensesUnassignedOnly)
- Updated Get-CIPPAlertSharepointQuota to accept PercentageThreshold parameter
- Updated Get-CIPPAlertQuotaUsed to accept PercentageThreshold parameter
- Updated Get-CIPPAlertEntraConnectSyncStatus to accept Hours parameter
- Updated Get-CIPPAlertHuntressRogueApps to accept IgnoreDisabledApps parameter
- Updated Get-CIPPAlertIntunePolicyConflicts to accept all configuration parameters directly
- Maintained backward compatibility with InputValue parameter
- Added comprehensive tests demonstrating both InputValue and direct parameter usage
- Direct parameters take priority over InputValue properties for flexibility

Co-authored-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
- Created comprehensive documentation explaining the new capability
- Documented all updated alert functions and their parameters
- Provided usage examples for both old and new methods
- Verified end-to-end parameter flow works correctly

Co-authored-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
- Properly added Hours parameter to function signature
- Fixed parameter handling logic to check PSBoundParameters
- Ensured HoursThreshold variable is correctly set from Hours or InputValue
- Addresses code review findings

Co-authored-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Copilot AI changed the title [WIP] Update timer to support multiple input objects Enable multiple direct parameters for scripted alerts Jan 16, 2026
Copilot AI requested a review from Zacgoose January 16, 2026 01:01
@Zacgoose
Copy link
Owner

@copilot ther eis no need to update the tests, no need to make documentation and no need to add explicid params where its already handled by $input

Per feedback, the system already handles multiple inputs through $input parameter.
Reverted:
- All alert function explicit parameter additions
- Test modifications
- Documentation

No explicit params needed where already handled by $input.

Co-authored-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 16, 2026

@copilot ther eis no need to update the tests, no need to make documentation and no need to add explicid params where its already handled by $input

Reverted all changes in commit d88e019. The explicit parameters, tests, and documentation have been removed as the system already handles multiple inputs through the $input parameter.

Copilot AI changed the title Enable multiple direct parameters for scripted alerts Investigation: Scripted alerts already support multiple input parameters Jan 16, 2026
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