Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
37e2b70ba4 | ||
|
8acae46b98 | ||
|
1fd460c84d | ||
|
9f28c976ce | ||
|
1ec287031c | ||
|
de89312352 |
@@ -4,6 +4,12 @@ The format is based on and uses the types of changes according to [Keep a Change
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed test 1.3.1 as notification window for password expiration is no longer required.
|
||||||
|
|
||||||
|
## [0.1.24] - 2024-07-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- New private function `Get-AuditMailboxDetail` for 6.1.2 and 6.1.3 tests to get the action details for the test.
|
- New private function `Get-AuditMailboxDetail` for 6.1.2 and 6.1.3 tests to get the action details for the test.
|
||||||
|
@@ -11,6 +11,14 @@ This PowerShell module is based on CIS benchmarks and is distributed under the C
|
|||||||
For full license details, please visit [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en).
|
For full license details, please visit [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en).
|
||||||
|
|
||||||
[Register for and download CIS Benchmarks](https://www.cisecurity.org/cis-benchmarks)
|
[Register for and download CIS Benchmarks](https://www.cisecurity.org/cis-benchmarks)
|
||||||
|
# Table of Contents
|
||||||
|
1. [Invoke-M365SecurityAudit](#Invoke-M365SecurityAudit)
|
||||||
|
2. [Export-M365SecurityAuditTable](#Export-M365SecurityAuditTable)
|
||||||
|
3. [Get-AdminRoleUserLicense](#Get-AdminRoleUserLicense)
|
||||||
|
4. [Get-MFAStatus](#Get-MFAStatus)
|
||||||
|
5. [Grant-M365SecurityAuditConsent](#Grant-M365SecurityAuditConsent)
|
||||||
|
6. [Remove-RowsWithEmptyCSVStatus](#Remove-RowsWithEmptyCSVStatus)
|
||||||
|
7. [Sync-CISExcelAndCsvData](#Sync-CISExcelAndCsvData)
|
||||||
|
|
||||||
## Invoke-M365SecurityAudit
|
## Invoke-M365SecurityAudit
|
||||||
|
|
||||||
|
BIN
docs/index.html
BIN
docs/index.html
Binary file not shown.
@@ -1,11 +1,11 @@
|
|||||||
Import-Module .\output\module\M365FoundationsCISReport\*\*.psd1
|
Import-Module .\output\module\M365FoundationsCISReport\*\*.psd1
|
||||||
. .\source\Classes\CISAuditResult.ps1
|
. .\source\Classes\CISAuditResult.ps1
|
||||||
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir docs -template ".\helpers\psDoc-master\src\out-html-template.ps1"
|
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir docs -template ".\helpers\psDoc-master\src\out-html-template.ps1"
|
||||||
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir ".\" -template ".\helpers\psDoc-master\src\out-markdown-template.ps1" -fileName ".\README.md"
|
.\helpers\psDoc-master\src\psDoc.ps1 -moduleName M365FoundationsCISReport -outputDir ".\" -template ".\helpers\psDoc-master\src\out-markdown-template.ps1" -fileName ".\README.md" -
|
||||||
|
|
||||||
|
|
||||||
<#
|
<#
|
||||||
$ver = "v0.1.23"
|
$ver = "v0.1.24"
|
||||||
git checkout main
|
git checkout main
|
||||||
git pull origin main
|
git pull origin main
|
||||||
git tag -a $ver -m "Release version $ver refactor Update"
|
git tag -a $ver -m "Release version $ver refactor Update"
|
||||||
|
@@ -45,13 +45,12 @@ function Test-PasswordNeverExpirePolicy {
|
|||||||
$isDefault = $domain.IsDefault
|
$isDefault = $domain.IsDefault
|
||||||
# Step (Condition C): Determine if the notification window is set to 30 days
|
# Step (Condition C): Determine if the notification window is set to 30 days
|
||||||
$notificationWindow = $domain.PasswordNotificationWindowInDays
|
$notificationWindow = $domain.PasswordNotificationWindowInDays
|
||||||
$notificationPolIsCompliant = $notificationWindow -eq 30
|
$notificationPolIsCompliant = $true # No longer a requirement
|
||||||
# Step (Condition A): Retrieve password expiration policy
|
# Step (Condition A): Retrieve password expiration policy
|
||||||
$passwordPolicy = $domain.PasswordValidityPeriodInDays
|
$passwordPolicy = $domain.PasswordValidityPeriodInDays
|
||||||
$pwPolIsCompliant = $passwordPolicy -eq 2147483647
|
$pwPolIsCompliant = $passwordPolicy -eq 2147483647
|
||||||
# Step (Condition A & B): Determine if the policy is compliant
|
# Step (Condition A & B): Determine if the policy is compliant
|
||||||
$overallResult = $overallResult -and $notificationPolIsCompliant -and $pwPolIsCompliant
|
$overallResult = $overallResult -and $notificationPolIsCompliant -and $pwPolIsCompliant
|
||||||
|
|
||||||
# Step (Condition A & B): Prepare failure reasons and details based on compliance
|
# Step (Condition A & B): Prepare failure reasons and details based on compliance
|
||||||
$failureReasons = if ($notificationPolIsCompliant -and $pwPolIsCompliant) {
|
$failureReasons = if ($notificationPolIsCompliant -and $pwPolIsCompliant) {
|
||||||
"N/A"
|
"N/A"
|
||||||
@@ -59,18 +58,14 @@ function Test-PasswordNeverExpirePolicy {
|
|||||||
else {
|
else {
|
||||||
"Password expiration is not set to never expire or notification window is not set to 30 days for domain $domainName. Run the following command to remediate: `nUpdate-MgDomain -DomainId $domainName -PasswordValidityPeriodInDays 2147483647 -PasswordNotificationWindowInDays 30`n"
|
"Password expiration is not set to never expire or notification window is not set to 30 days for domain $domainName. Run the following command to remediate: `nUpdate-MgDomain -DomainId $domainName -PasswordValidityPeriodInDays 2147483647 -PasswordNotificationWindowInDays 30`n"
|
||||||
}
|
}
|
||||||
|
|
||||||
$details = "$domainName|$passwordPolicy days|$notificationWindow days|$isDefault"
|
$details = "$domainName|$passwordPolicy days|$notificationWindow days|$isDefault"
|
||||||
|
|
||||||
# Add details and failure reasons to the lists
|
# Add details and failure reasons to the lists
|
||||||
$detailsList += $details
|
$detailsList += $details
|
||||||
$failureReasonsList += $failureReasons
|
$failureReasonsList += $failureReasons
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare the final failure reason and details
|
# Prepare the final failure reason and details
|
||||||
$finalFailureReason = $failureReasonsList -join "`n"
|
$finalFailureReason = $failureReasonsList -join "`n"
|
||||||
$finalDetails = $detailsList -join "`n"
|
$finalDetails = $detailsList -join "`n"
|
||||||
|
|
||||||
# Step: Create and populate the CISAuditResult object
|
# Step: Create and populate the CISAuditResult object
|
||||||
$params = @{
|
$params = @{
|
||||||
Rec = $recnum
|
Rec = $recnum
|
||||||
@@ -86,7 +81,6 @@ function Test-PasswordNeverExpirePolicy {
|
|||||||
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
|
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end {
|
end {
|
||||||
# Return the audit result
|
# Return the audit result
|
||||||
return $auditResult
|
return $auditResult
|
||||||
|
Reference in New Issue
Block a user