Skip to content

Commit e3c4678

Browse files
committed
fix: set-transportrule identity error
1 parent 97a5702 commit e3c4678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Transport/Invoke-AddTransportRule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Function Invoke-AddTransportRule {
2222
try {
2323
if ($Existing) {
2424
Write-Host 'Found existing'
25-
$RequestParams | Add-Member -NotePropertyValue $RequestParams.name -NotePropertyName Identity
25+
$RequestParams | Add-Member -NotePropertyValue $Existing.Identity -NotePropertyName Identity -Force
2626
$null = New-ExoRequest -tenantid $tenantFilter -cmdlet 'Set-TransportRule' -cmdParams ($RequestParams | Select-Object -Property * -ExcludeProperty UseLegacyRegex) -useSystemMailbox $true
2727
"Successfully set transport rule for $tenantFilter."
2828
} else {

0 commit comments

Comments
 (0)