Skip to content

Commit

Permalink
chore: rerun Update-StandardsComments.ps1 and CRLF to LF
Browse files Browse the repository at this point in the history
  • Loading branch information
OfficialEsco committed Feb 25, 2025
1 parent eda1055 commit 6b26d54
Show file tree
Hide file tree
Showing 118 changed files with 2,891 additions and 2,653 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function Invoke-CIPPStandardActivityBasedTimeout {
{"type":"autoComplete","multiple":false,"creatable":false,"label":"Select value","name":"standards.ActivityBasedTimeout.timeout","options":[{"label":"1 Hour","value":"01:00:00"},{"label":"3 Hours","value":"03:00:00"},{"label":"6 Hours","value":"06:00:00"},{"label":"12 Hours","value":"12:00:00"},{"label":"24 Hours","value":"1.00:00:00"}]}
IMPACT
Medium Impact
ADDEDDATE
2022-04-13
POWERSHELLEQUIVALENT
Portal or Graph API
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardAddDKIM {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2023-03-14
POWERSHELLEQUIVALENT
New-DkimSigningConfig and Set-DkimSigningConfig
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardAnonReportDisable {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2021-11-16
POWERSHELLEQUIVALENT
Update-MgBetaAdminReportSetting -BodyParameter @{displayConcealedNames = \$true}
RECOMMENDEDBY
Expand Down
444 changes: 223 additions & 221 deletions Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAntiPhishPolicy.ps1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardAntiSpamSafeList {
{"type":"switch","name":"standards.AntiSpamSafeList.EnableSafeList","label":"Enable Safe List"}
IMPACT
Medium Impact
ADDEDDATE
2025-02-15
POWERSHELLEQUIVALENT
Set-HostedConnectionFilterPolicy "Default" -EnableSafeList \$true
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardAppDeploy {
{"type":"textField","name":"standards.AppDeploy.appids","label":"Application IDs, comma separated"}
IMPACT
Low Impact
ADDEDDATE
2024-07-07
POWERSHELLEQUIVALENT
Portal or Graph API
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,74 +1,76 @@
function Invoke-CIPPStandardAtpPolicyForO365 {
<#
.FUNCTIONALITY
Internal
.COMPONENT
(APIName) AtpPolicyForO365
.SYNOPSIS
(Label) Default Atp Policy For O365
.DESCRIPTION
(Helptext) This creates a Atp policy that enables Defender for Office 365 for SharePoint, OneDrive and Microsoft Teams.
(DocsDescription) This creates a Atp policy that enables Defender for Office 365 for SharePoint, OneDrive and Microsoft Teams.
.NOTES
CAT
Defender Standards
TAG
"CIS"
ADDEDCOMPONENT
{"type":"switch","label":"Allow people to click through Protected View even if Safe Documents identified the file as malicious","name":"standards.AtpPolicyForO365.AllowSafeDocsOpen","default":false,"required":false}
IMPACT
Low Impact
POWERSHELLEQUIVALENT
Set-AtpPolicyForO365
RECOMMENDEDBY
"CIS"
UPDATECOMMENTBLOCK
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
.LINK
https://docs.cipp.app/user-documentation/tenant/standards/list-standards/defender-standards#low-impact
#>

param($Tenant, $Settings)
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AtpPolicyForO365'

$CurrentState = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-AtpPolicyForO365' |
Select-Object EnableATPForSPOTeamsODB, EnableSafeDocs, AllowSafeDocsOpen

$StateIsCorrect = ($CurrentState.EnableATPForSPOTeamsODB -eq $true) -and
($CurrentState.EnableSafeDocs -eq $true) -and
($CurrentState.AllowSafeDocsOpen -eq $Settings.AllowSafeDocsOpen)

if ($Settings.remediate -eq $true) {
if ($StateIsCorrect -eq $true) {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 already set.' -sev Info
} else {
$cmdparams = @{
EnableATPForSPOTeamsODB = $true
EnableSafeDocs = $true
AllowSafeDocsOpen = $Settings.AllowSafeDocsOpen
}

try {
New-ExoRequest -tenantid $Tenant -cmdlet 'Set-AtpPolicyForO365' -cmdparams $cmdparams -UseSystemMailbox $true
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Updated Atp Policy For O365' -sev Info
} catch {
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message
Write-LogMessage -API 'Standards' -tenant $Tenant -message "Failed to set Atp Policy For O365. Error: $ErrorMessage" -sev Error
}
}
}

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

if ($StateIsCorrect -eq $true) {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 is enabled' -sev Info
} else {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 is not enabled' -sev Alert
}
}

if ($Settings.report -eq $true) {
Add-CIPPBPAField -FieldName 'AtpPolicyForO365' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $tenant
}

}
function Invoke-CIPPStandardAtpPolicyForO365 {
<#
.FUNCTIONALITY
Internal
.COMPONENT
(APIName) AtpPolicyForO365
.SYNOPSIS
(Label) Default Atp Policy For O365
.DESCRIPTION
(Helptext) This creates a Atp policy that enables Defender for Office 365 for SharePoint, OneDrive and Microsoft Teams.
(DocsDescription) This creates a Atp policy that enables Defender for Office 365 for SharePoint, OneDrive and Microsoft Teams.
.NOTES
CAT
Defender Standards
TAG
"CIS"
ADDEDCOMPONENT
{"type":"switch","label":"Allow people to click through Protected View even if Safe Documents identified the file as malicious","name":"standards.AtpPolicyForO365.AllowSafeDocsOpen","defaultValue":false,"required":false}
IMPACT
Low Impact
ADDEDDATE
2024-03-25
POWERSHELLEQUIVALENT
Set-AtpPolicyForO365
RECOMMENDEDBY
"CIS"
UPDATECOMMENTBLOCK
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
.LINK
https://docs.cipp.app/user-documentation/tenant/standards/list-standards/defender-standards#low-impact
#>

param($Tenant, $Settings)
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AtpPolicyForO365'

$CurrentState = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-AtpPolicyForO365' |
Select-Object EnableATPForSPOTeamsODB, EnableSafeDocs, AllowSafeDocsOpen

$StateIsCorrect = ($CurrentState.EnableATPForSPOTeamsODB -eq $true) -and
($CurrentState.EnableSafeDocs -eq $true) -and
($CurrentState.AllowSafeDocsOpen -eq $Settings.AllowSafeDocsOpen)

if ($Settings.remediate -eq $true) {
if ($StateIsCorrect -eq $true) {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 already set.' -sev Info
} else {
$cmdparams = @{
EnableATPForSPOTeamsODB = $true
EnableSafeDocs = $true
AllowSafeDocsOpen = $Settings.AllowSafeDocsOpen
}

try {
New-ExoRequest -tenantid $Tenant -cmdlet 'Set-AtpPolicyForO365' -cmdparams $cmdparams -UseSystemMailbox $true
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Updated Atp Policy For O365' -sev Info
} catch {
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message
Write-LogMessage -API 'Standards' -tenant $Tenant -message "Failed to set Atp Policy For O365. Error: $ErrorMessage" -sev Error
}
}
}

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

if ($StateIsCorrect -eq $true) {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 is enabled' -sev Info
} else {
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Atp Policy For O365 is not enabled' -sev Alert
}
}

if ($Settings.report -eq $true) {
Add-CIPPBPAField -FieldName 'AtpPolicyForO365' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $tenant
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardAuditLog {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2021-11-16
POWERSHELLEQUIVALENT
Enable-OrganizationCustomization
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardAuthMethodsSettings {
{"type":"autoComplete","multiple":false,"creatable":false,"required":false,"name":"standards.AuthMethodsSettings.SystemCredential","label":"System Credential Preferences","options":[{"label":"Microsoft managed","value":"default"},{"label":"Enabled","value":"enabled"},{"label":"Disabled","value":"disabled"}]}
IMPACT
Low Impact
ADDEDDATE
2025-02-10
POWERSHELLEQUIVALENT
Update-MgBetaPolicyAuthenticationMethodPolicy
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardAutoAddProxy {
ADDEDCOMPONENT
IMPACT
Medium Impact
ADDEDDATE
2025-02-07
POWERSHELLEQUIVALENT
Set-Mailbox -EmailAddresses @{add=\$EmailAddress}
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardAutoExpandArchive {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2021-11-16
POWERSHELLEQUIVALENT
Set-OrganizationConfig -AutoExpandingArchive
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardBookings {
{"type":"autoComplete","multiple":false,"label":"Select value","name":"standards.Bookings.state","options":[{"label":"Enabled","value":"true"},{"label":"Disabled","value":"false"}]}
IMPACT
Medium Impact
ADDEDDATE
2024-05-31
POWERSHELLEQUIVALENT
Set-OrganizationConfig -BookingsEnabled
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function Invoke-CIPPStandardBranding {
{"type":"switch","name":"standards.Branding.isFooterShown","label":"Show footer"}
IMPACT
Low Impact
ADDEDDATE
2024-05-13
POWERSHELLEQUIVALENT
Portal only
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardCloudMessageRecall {
{"type":"autoComplete","multiple":false,"label":"Select value","name":"standards.CloudMessageRecall.state","options":[{"label":"Enabled","value":"true"},{"label":"Disabled","value":"false"}]}
IMPACT
Low Impact
ADDEDDATE
2024-05-31
POWERSHELLEQUIVALENT
Set-OrganizationConfig -MessageRecallEnabled
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardConditionalAccessTemplate {
IMPACT
High Impact
ADDEDDATE
2023-12-30
ADDEDCOMPONENT
{"type":"autoComplete","name":"TemplateList","multiple":false,"label":"Select Conditional Access Template","api":{"url":"/api/ListCATemplates","labelField":"displayName","valueField":"GUID","queryKey":"ListCATemplates"}}
{"name":"state","label":"What state should we deploy this template in?","type":"radio","options":[{"value":"donotchange","label":"Do not change state"},{"value":"Enabled","label":"Set to enabled"},{"value":"Disabled","label":"Set to disabled"},{"value":"enabledForReportingButNotEnforced","label":"Set to report only"}]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardDelegateSentItems {
{"type":"switch","label":"Include user mailboxes","name":"standards.DelegateSentItems.IncludeUserMailboxes"}
IMPACT
Medium Impact
ADDEDDATE
2021-11-16
POWERSHELLEQUIVALENT
Set-Mailbox
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardDeletedUserRentention {
{"type":"autoComplete","multiple":false,"name":"standards.DeletedUserRentention.Days","label":"Retention time (Default 30 days)","options":[{"label":"30 days","value":"30"},{"label":"90 days","value":"90"},{"label":"1 year","value":"365"},{"label":"2 years","value":"730"},{"label":"3 years","value":"1095"},{"label":"4 years","value":"1460"},{"label":"5 years","value":"1825"},{"label":"6 years","value":"2190"},{"label":"7 years","value":"2555"},{"label":"8 years","value":"2920"},{"label":"9 years","value":"3285"},{"label":"10 years","value":"3650"}]}
IMPACT
Low Impact
ADDEDDATE
2022-06-15
POWERSHELLEQUIVALENT
Update-MgBetaAdminSharePointSetting
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardDisableAddShortcutsToOneDrive {
{"type":"autoComplete","multiple":false,"creatable":false,"label":"Add Shortcuts To OneDrive button state","name":"standards.DisableAddShortcutsToOneDrive.state","options":[{"label":"Disabled","value":"true"},{"label":"Enabled","value":"false"}]}
IMPACT
Medium Impact
ADDEDDATE
2023-07-25
POWERSHELLEQUIVALENT
Set-SPOTenant -DisableAddShortcutsToOneDrive \$true or \$false
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardDisableAdditionalStorageProviders {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2024-01-17
POWERSHELLEQUIVALENT
Get-OwaMailboxPolicy \| Set-OwaMailboxPolicy -AdditionalStorageProvidersEnabled \$False
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardDisableAppCreation {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2024-03-20
POWERSHELLEQUIVALENT
Update-MgPolicyAuthorizationPolicy
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableBasicAuthSMTP {
ADDEDCOMPONENT
IMPACT
Medium Impact
ADDEDDATE
2021-11-16
POWERSHELLEQUIVALENT
Set-TransportConfig -SmtpClientAuthenticationDisabled \$true
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableEmail {
ADDEDCOMPONENT
IMPACT
High Impact
ADDEDDATE
2023-12-18
POWERSHELLEQUIVALENT
Update-MgBetaPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardDisableExternalCalendarSharing {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2024-01-08
POWERSHELLEQUIVALENT
Get-SharingPolicy \| Set-SharingPolicy -Enabled \$False
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableGuestDirectory {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2022-05-04
POWERSHELLEQUIVALENT
Set-AzureADMSAuthorizationPolicy -GuestUserRoleId '2af84b1e-32c8-42b7-82bc-daa82404023b'
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableGuests {
ADDEDCOMPONENT
IMPACT
Medium Impact
ADDEDDATE
2022-10-20
POWERSHELLEQUIVALENT
Graph API
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableM365GroupUsers {
ADDEDCOMPONENT
IMPACT
Low Impact
ADDEDDATE
2022-07-17
POWERSHELLEQUIVALENT
Update-MgBetaDirectorySetting
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Invoke-CIPPStandardDisableOutlookAddins {
ADDEDCOMPONENT
IMPACT
Medium Impact
ADDEDDATE
2024-02-05
POWERSHELLEQUIVALENT
Get-ManagementRoleAssignment \| Remove-ManagementRoleAssignment
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function Invoke-CIPPStandardDisableQRCodePin {
ADDEDCOMPONENT
IMPACT
High Impact
ADDEDDATE
2024-02-10
POWERSHELLEQUIVALENT
Update-MgBetaPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration
RECOMMENDEDBY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Invoke-CIPPStandardDisableReshare {
ADDEDCOMPONENT
IMPACT
High Impact
ADDEDDATE
2022-06-15
POWERSHELLEQUIVALENT
Update-MgBetaAdminSharePointSetting
RECOMMENDEDBY
Expand Down
Loading

0 comments on commit 6b26d54

Please sign in to comment.