Skip to content

Commit

Permalink
Merge pull request #905 from cipptesting/dev
Browse files Browse the repository at this point in the history
Updated Invoke-AddSpamFilter.ps1. Made priority configurable
  • Loading branch information
KelvinTegelaar authored Jun 22, 2024
2 parents 03502a7 + b4a8039 commit 4c79189
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Function Invoke-AddSpamFilter {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'

$RequestParams = $Request.Body.PowerShellCommand | ConvertFrom-Json | Select-Object -Property * -ExcludeProperty GUID, comments
$RequestPriority = $Request.Body.Priority

$Tenants = ($Request.body | Select-Object Select_*).psobject.properties.value
$Result = foreach ($Tenantfilter in $tenants) {
Expand All @@ -26,6 +27,7 @@ Function Invoke-AddSpamFilter {
'hostedcontentfilterpolicy' = "$($RequestParams.name)"
'recipientdomainis' = @($domains)
'Enabled' = $true
'Priority' = $RequestPriority
}
$GraphRequest = New-ExoRequest -tenantid $Tenantfilter -cmdlet 'New-HostedContentFilterRule' -cmdParams $ruleparams
"Successfully created spamfilter for $tenantfilter."
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c79189

Please sign in to comment.