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

Feature/154 dc 1 extend log retrieval period #232

Closed
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
08100d5
Create Test-HawkLicenseType to determine whether Tenant has E3 or E5 …
jonnybottles Jan 10, 2025
c3b9a31
Create Test-HawkLicenseType to determine whether Tenant has E3 or E5 …
jonnybottles Jan 10, 2025
c8c3788
Create Test-HawkLicenseType to determine whether Tenant has E3 or E5 …
jonnybottles Jan 10, 2025
b6dff23
Update Test-HawkLicenseType and add MaxAuditDays to Initialize-HawkGl…
jonnybottles Jan 10, 2025
a0bb88b
Removed Azure AD license check and associated variable as this is no …
jonnybottles Jan 10, 2025
516826c
Removed Azure AD license check and associated variable as this is no …
jonnybottles Jan 10, 2025
6014f62
Add prompt for user in the event they enter a day search range outsid…
jonnybottles Jan 10, 2025
95ba314
Update multiple functions to update the user with completion status.
jonnybottles Jan 10, 2025
de17ffd
Update multiple functions to update the user with completion status.
jonnybottles Jan 10, 2025
e0684f3
Update multiple functions to update the user with completion status.
jonnybottles Jan 10, 2025
292862c
Update multiple functions to update the user with completion status.
jonnybottles Jan 10, 2025
2d42e40
Update Get-HawkUserMailBoxAuditing to inform user of long wait periods.
jonnybottles Jan 11, 2025
6a0bfe9
Update Get-HawkUserMailBoxAuditing to inform user of long wait periods.
jonnybottles Jan 11, 2025
91ce086
Add check at beginning of intialize-hawkglobalobject to check for hal…
jonnybottles Jan 11, 2025
7c60ff4
Add check at beginning of intialize-hawkglobalobject to check for hal…
jonnybottles Jan 11, 2025
70b992a
Remove bug where program crashes if uses CTRL Cs at point of being as…
jonnybottles Jan 11, 2025
74d10dd
Add test-hawkglobalobject function and have every public function cal…
jonnybottles Jan 11, 2025
6a7a0be
Append investigation folder with seconds to avoid duplicate folder cr…
jonnybottles Jan 11, 2025
45d4abe
Change UTC to Z in timestamp format to conform to ISO 8601 standard a…
jonnybottles Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create Test-HawkLicenseType to determine whether Tenant has E3 or E5 …
…licensing.
jonnybottles committed Jan 10, 2025
commit c3b9a31c557f165e93752be06199e98b8e291a24
25 changes: 11 additions & 14 deletions Hawk/internal/functions/Test-HawkLicenseType.ps1
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@ function Test-HawkLicenseType {
Identifies the Microsoft 365 license type (E5, E3, or other) for the current tenant and returns the corresponding retention period.

.DESCRIPTION
The `Test-HawkLicenseType` function retrieves the list of subscribed SKUs for the tenant using the Microsoft Graph API.
It checks the license type based on the SkuPartNumber and returns the appropriate retention period in days:
This function retrieves the list of subscribed SKUs for the tenant using the Microsoft Graph API.
It checks the license type based on the `SkuPartNumber` and returns the appropriate retention period in days:
- 365 days for E5 licenses (including equivalents like Developer Pack E5).
- 180 days for E3 licenses.
- 180 days for E3 licenses (including equivalents like Developer Pack E3).
- 90 days as a default retention period if no matching license is found.

.EXAMPLE
PS C:\> Test-HawkLicenseType
Returns the retention period based on the tenant's license type.
This command returns the retention period based on the tenant's Microsoft 365 license type.

.NOTES
Author: Jonathan Butler
@@ -21,30 +21,27 @@ function Test-HawkLicenseType {

.REQUIREMENTS
- Microsoft.Graph module must be installed and authenticated.
- User must have permission to query the tenant's subscription details.
- The user must have permission to query the tenant's subscription details.

.PARAMETER None
This function does not take any parameters.

.RETURNS
[int] - Retention period in days:
- 365 for E5 or equivalent licenses.
- 180 for E3 or equivalent licenses.
- 90 by default if no matching license is found.

.INPUTS
None. The function does not accept input from the pipeline.
None. This function does not accept input from the pipeline.

.OUTPUTS
[int] - Retention period in days.
[int] - Returns the retention period in days based on the identified license type:
- 365 for E5 or equivalent licenses.
- 180 for E3 or equivalent licenses.
- 90 as the default retention period.

.COMPONENT
Microsoft Graph PowerShell Module

.LINK
https://learn.microsoft.com/en-us/powershell/microsoftgraph
#>

#>
[CmdletBinding()]
[OutputType([int])]
param()