Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI-1: Add Additional Command Line Parameters #193

Open
jonnybottles opened this issue Dec 12, 2024 · 0 comments
Open

UI-1: Add Additional Command Line Parameters #193

jonnybottles opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
status/backlog In backlog / validated type/feature New feature or request type/gaant Used for Gaant Visualization

Comments

@jonnybottles
Copy link
Collaborator

jonnybottles commented Dec 12, 2024

Proposed Solution

Add consistent command line parameters to both investigation commands (Start-HawkTenantInvestigation and Start-HawkUserInvestigation) that allow specifying all configuration options currently handled through interactive prompts.

Parameters to add to both commands:

  • IAgreeToTheEula (switch)
  • SkipUpdate (switch)
  • DaysToLookBack (integer, 1-365)
  • StartDate (datetime)
  • EndDate (datetime)
  • OutputFolder (string path)
  • Domain (string)

Technical Requirements

Parameter Implementation:

  • Use standard PowerShell parameter attributes and validation.
  • Maintain backward compatibility with existing interactive prompts when parameters aren't specified.
  • Parameters should pass through to Initialize-HawkGlobalObject.

Input Validation Requirements:

  • DaysToLookBack: Must be between 1-365 days.
  • StartDate/EndDate:
    • Must be valid datetime objects.
    • StartDate must be before EndDate.
    • Date range cannot exceed 365 days.
  • OutputFolder:
    • Must be a valid file system path.
    • Must have write permissions.
    • Create the folder if it doesn't exist.

Parameter Priority Logic:

  • If both DaysToLookBack and StartDate are specified, StartDate takes precedence.
  • If no date parameters are specified, default to a 90-day lookback.
  • If EndDate is not specified, default to the current date.

Help Documentation:

  • Update command help documentation to include new parameters.
  • Add examples showing parameter usage.
  • Document parameter validation rules.

Implementation Approach

  1. Add Parameter Validation:

    • Implement validation for all parameters.
    • Create clear error messages for validation failures.
    • Handle edge cases appropriately.
  2. Update Both Investigation Commands:

    • Add new parameters.
    • Implement validation logic.
    • Pass validated parameters to Initialize-HawkGlobalObject.
    • Maintain existing interactive prompts as a fallback.
  3. Add Logging:

    • Log parameter values used.
    • Log validation failures.
    • Log parameter priority decisions.

Acceptance Criteria

  • Both commands accept all listed parameters.
  • All parameter validation rules are enforced.
  • Parameters correctly pass through to Initialize-HawkGlobalObject.
  • Interactive prompts still work when parameters are not specified.
  • Help documentation is updated.
  • Existing functionality is maintained when no parameters are used.

Dependencies

  • Existing Initialize-HawkGlobalObject parameter handling.

Impact

This change will:

  • Improve automation capabilities.
  • Reduce manual intervention needed.
  • Maintain backward compatibility.
  • Add consistent parameter handling across commands.
  • Improve validation and error handling.
@jonnybottles jonnybottles added type/feature New feature or request status/backlog In backlog / validated type/gaant Used for Gaant Visualization labels Dec 12, 2024
@jonnybottles jonnybottles added type/gaant Used for Gaant Visualization and removed type/gaant Used for Gaant Visualization labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/backlog In backlog / validated type/feature New feature or request type/gaant Used for Gaant Visualization
Projects
None yet
Development

No branches or pull requests

2 participants