Skip to content

Commit

Permalink
Remove uncessary comments from Start-HawkTenatnInvestigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnybottles committed Jan 15, 2025
1 parent 679299b commit 4fa8bab
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions Hawk/functions/Tenant/Start-HawkTenantInvestigation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,54 +107,6 @@
)




# begin {
# if ($NonInteractive) {
# ##############################################################################
# # 1. SHORT-CIRCUIT CHECK: Must specify either StartDate or DaysToLookBack
# ##############################################################################
# if (-not $PSBoundParameters.ContainsKey('DaysToLookBack') -and -not $PSBoundParameters.ContainsKey('StartDate')) {
# Stop-PSFFunction -Message "Either StartDate or DaysToLookBack must be specified in non-interactive mode" -EnableException $true
# }

# ##############################################################################
# # 2. If -DaysToLookBack was explicitly passed, validate it up front
# ##############################################################################
# if ($PSBoundParameters.ContainsKey('DaysToLookBack')) {
# if ($DaysToLookBack -lt 1 -or $DaysToLookBack -gt 365) {
# Stop-PSFFunction -Message "DaysToLookBack must be between 1 and 365" -EnableException $true
# }
# else {
# # Convert DaysToLookBack to StartDate/EndDate so they're never null
# $ConvertedDates = Convert-HawkDaysToDate -DaysToLookBack $DaysToLookBack
# $StartDate = $ConvertedDates.StartDate
# $EndDate = $ConvertedDates.EndDate
# }
# }

# # Now call validation with updated StartDate/EndDate
# $validation = Test-HawkInvestigationParameter `
# -StartDate $StartDate -EndDate $EndDate `
# -DaysToLookBack $DaysToLookBack -FilePath $FilePath -NonInteractive

# if (-not $validation.IsValid) {
# foreach ($error in $validation.ErrorMessages) {
# Stop-PSFFunction -Message $error -EnableException $true
# }
# }

# try {
# Initialize-HawkGlobalObject -StartDate $StartDate -EndDate $EndDate `
# -DaysToLookBack $DaysToLookBack -FilePath $FilePath `
# -SkipUpdate:$SkipUpdate -NonInteractive:$NonInteractive
# }
# catch {
# Stop-PSFFunction -Message "Failed to initialize Hawk: $_" -EnableException $true
# }
# }
# }

begin {
if ($NonInteractive) {
##############################################################################
Expand Down

0 comments on commit 4fa8bab

Please sign in to comment.