Skip to content

Commit 1469ea8

Browse files
standards updates
1 parent a44aaa5 commit 1469ea8

7 files changed

+19
-8
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEXODisableAutoForwarding.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ function Invoke-CIPPStandardEXODisableAutoForwarding {
5959
if ($StateIsCorrect -eq $true) {
6060
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Auto forwarding is disabled.' -sev Info
6161
} else {
62-
Write-StandardsAlert -message "Auto forwarding is not disabled" -object $CurrentInfo -tenant $tenant -standardName 'EXODisableAutoForwarding' -standardId $Settings.standardId
62+
Write-StandardsAlert -message 'Auto forwarding is not disabled' -object $CurrentInfo -tenant $tenant -standardName 'EXODisableAutoForwarding' -standardId $Settings.standardId
6363
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Auto forwarding is not disabled.' -sev Info
6464
}
6565
}
6666

6767
if ($Settings.report -eq $true) {
68+
$state = $StateIsCorrect ? $true : $CurrentInfo.AutoForwardingMode
69+
Set-CIPPStandardsCompareField -FieldName 'AutoForwardingDisabled' -FieldValue $state -TenantFilter $Tenant
6870
Add-CIPPBPAField -FieldName 'AutoForwardingDisabled' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $tenant
6971
}
7072

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardExcludedfileExt.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function Invoke-CIPPStandardExcludedfileExt {
7676
}
7777

7878
if ($Settings.report -eq $true) {
79+
Set-CIPPStandardsCompareField -FieldName 'standards.ExcludedfileExt' -FieldValue $CurrentInfo.excludedFileExtensionsForSyncApp -Tenant $tenant
7980
Add-CIPPBPAField -FieldName 'ExcludedfileExt' -FieldValue $CurrentInfo.excludedFileExtensionsForSyncApp -StoreAs json -Tenant $tenant
8081
}
8182
}

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardExternalMFATrusted.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ function Invoke-CIPPStandardExternalMFATrusted {
3838
$WantedState = if ($state -eq 'true') { $true } else { $false }
3939
$StateMessage = if ($WantedState) { 'enabled' } else { 'disabled' }
4040

41-
if ($Settings.report -eq $true) {
4241

43-
Add-CIPPBPAField -FieldName 'ExternalMFATrusted' -FieldValue $ExternalMFATrusted.inboundTrust.isMfaAccepted -StoreAs bool -Tenant $Tenant
44-
}
4542

4643
# Input validation
4744
if (([string]::IsNullOrWhiteSpace($state) -or $state -eq 'Select a value') -and ($Settings.remediate -eq $true -or $Settings.alert -eq $true)) {
@@ -67,6 +64,11 @@ function Invoke-CIPPStandardExternalMFATrusted {
6764
}
6865
}
6966
}
67+
if ($Settings.report -eq $true) {
68+
$state = $ExternalMFATrusted.inboundTrust.isMfaAccepted ? $true : $ExternalMFATrusted.inboundTrust
69+
Set-CIPPStandardsCompareField -FieldName 'ExternalMFATrusted' -FieldValue $ExternalMFATrusted.inboundTrust.isMfaAccepted -TenantFilter $Tenant
70+
Add-CIPPBPAField -FieldName 'ExternalMFATrusted' -FieldValue $ExternalMFATrusted.inboundTrust.isMfaAccepted -StoreAs bool -Tenant $Tenant
71+
}
7072

7173
if ($Settings.alert -eq $true) {
7274

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardFocusedInbox.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function Invoke-CIPPStandardFocusedInbox {
7272
}
7373

7474
if ($Settings.report -eq $true) {
75+
Set-CIPPStandardsCompareField -FieldName 'FocusedInboxCorrectState' -FieldValue $StateIsCorrect -TenantFilter $Tenant
7576
Add-CIPPBPAField -FieldName 'FocusedInboxCorrectState' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $Tenant
7677
}
7778
}

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardGlobalQuarantineNotifications.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ function Invoke-CIPPStandardGlobalQuarantineNotifications {
4444
}
4545

4646
if ($Settings.report -eq $true) {
47-
47+
$ReportState = $CurrentState.EndUserSpamNotificationFrequency -eq $WantedState ? $true : $CurrentState.EndUserSpamNotificationFrequency
48+
Set-CIPPStandardsCompareField -FieldName 'GlobalQuarantineNotificationsSet' -FieldValue $ReportState -Tenant $Tenant
4849
Add-CIPPBPAField -FieldName 'GlobalQuarantineNotificationsSet' -FieldValue [string]$CurrentState.EndUserSpamNotificationFrequency -StoreAs string -Tenant $Tenant
4950
}
5051
# Get notification interval using null-coalescing operator

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardGuestInvite.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function Invoke-CIPPStandardGuestInvite {
2020
ADDEDDATE
2121
2024-11-12
2222
POWERSHELLEQUIVALENT
23-
23+
2424
RECOMMENDEDBY
2525
UPDATECOMMENTBLOCK
2626
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
@@ -68,12 +68,13 @@ function Invoke-CIPPStandardGuestInvite {
6868
if ($StateIsCorrect -eq $true) {
6969
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Guest Invite settings is enabled.' -sev Info
7070
} else {
71-
Write-StandardsAlert -message "Guest Invite settings is not enabled" -object $CurrentState -tenant $tenant -standardName 'GuestInvite' -standardId $Settings.standardId
71+
Write-StandardsAlert -message 'Guest Invite settings is not enabled' -object $CurrentState -tenant $tenant -standardName 'GuestInvite' -standardId $Settings.standardId
7272
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Guest Invite settings is not enabled.' -sev Info
7373
}
7474
}
7575

7676
if ($Settings.report -eq $true) {
77+
Set-CIPPStandardsCompareField -FieldName 'GuestInvite' -FieldValue $StateIsCorrect -TenantFilter $Tenant
7778
Add-CIPPBPAField -FieldName 'GuestInvite' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $tenant
7879
}
7980
}

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardintuneBrandingProfile.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,15 @@ function Invoke-CIPPStandardintuneBrandingProfile {
9292
if ($StateIsCorrect -eq $true) {
9393
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Intune Branding Profile is correctly configured' -sev Info
9494
} else {
95-
Write-StandardsAlert -message "Intune Branding Profile is not correctly configured" -object $CurrentState -tenant $tenant -standardName 'intuneBrandingProfile' -standardId $Settings.standardId
95+
Write-StandardsAlert -message 'Intune Branding Profile is not correctly configured' -object $CurrentState -tenant $tenant -standardName 'intuneBrandingProfile' -standardId $Settings.standardId
9696
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Intune Branding Profile is not correctly configured' -sev Info
9797
}
9898
}
9999

100100
if ($Settings.report -eq $true) {
101+
$ReportState = $StateIsCorrect ? $true : $CurrentState
102+
Set-CIPPStandardsCompareField -FieldName 'intuneBrandingProfile' -FieldValue $ReportState -TenantFilter $Tenant
101103
Add-CIPPBPAField -FieldName 'intuneBrandingProfile' -FieldValue [bool]$StateIsCorrect -StoreAs bool -Tenant $tenant
102104
}
103105
}
106+

0 commit comments

Comments
 (0)