Skip to content

Commit 3b6bef5

Browse files
Migrate SecurityInsights from generation to main (#22739)
* Move SecurityInsights to main * Update ChangeLog.md * Create BreakingChangeIssues.csv --------- Co-authored-by: Beisi Zhou <[email protected]>
1 parent d919782 commit 3b6bef5

12 files changed

+144
-129
lines changed

src/SecurityInsights/Az.SecurityInsights.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 8/30/2023
6+
# Generated on: 9/6/2023
77
#
88

99
@{
@@ -141,7 +141,7 @@ PrivateData = @{
141141
# IconUri = ''
142142

143143
# ReleaseNotes of this module
144-
ReleaseNotes = '* Added breaking change message for ''Az.SecurityInsights''.'
144+
# ReleaseNotes = ''
145145

146146
# Prerelease string of this module
147147
# Prerelease = ''

src/SecurityInsights/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Fixed parameters' issues for `New-AzSentinelAlertRule` and `Update-AzSentinelAlertRule` [#21181][#21217][#22318]
2223

2324
## Version 3.0.2
2425
* Added breaking change message for `Az.SecurityInsights`.

src/SecurityInsights/SecurityInsights.sln

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{01B5100F-D904-494E-A1F1-4DD7C8C1324A}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{D192AA4A-E37B-4F8D-A071-4DA100FC4FCF}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{B37C0D97-969B-409A-B708-D71E3EEBF2C5}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{3C350677-1B17-44C3-87C9-04AA0BEEBF44}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{384B3059-A5ED-4594-9FF4-015674C6F3F4}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{F2EF809D-66DF-4869-A679-40C714667376}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{93E95C0E-C1A4-4494-A0FA-5429A7DF30DC}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{1FFBFDBE-6166-45CD-A729-874B98B0D7D6}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{079C4B44-6179-4586-A15D-0A9F3A00907C}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{20792480-64B7-4708-B7F6-9E375FA85BA0}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{EBE142FA-D5AE-4EA7-AC89-6EA38C75250E}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{553139FF-9CA2-4374-9107-862107F89993}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.SecurityInsights", "Az.SecurityInsights.csproj", "{C1143F0C-1FBE-46A6-861D-30999CA4BED6}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.SecurityInsights", "Az.SecurityInsights.csproj", "{3FCC12DB-E839-4AFC-8942-317EB7F2EEC5}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,33 +26,33 @@ Global
2626
HideSolutionNode = FALSE
2727
EndGlobalSection
2828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
29-
{01B5100F-D904-494E-A1F1-4DD7C8C1324A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{01B5100F-D904-494E-A1F1-4DD7C8C1324A}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{01B5100F-D904-494E-A1F1-4DD7C8C1324A}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{01B5100F-D904-494E-A1F1-4DD7C8C1324A}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{B37C0D97-969B-409A-B708-D71E3EEBF2C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{B37C0D97-969B-409A-B708-D71E3EEBF2C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{B37C0D97-969B-409A-B708-D71E3EEBF2C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{B37C0D97-969B-409A-B708-D71E3EEBF2C5}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{384B3059-A5ED-4594-9FF4-015674C6F3F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38-
{384B3059-A5ED-4594-9FF4-015674C6F3F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
39-
{384B3059-A5ED-4594-9FF4-015674C6F3F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
40-
{384B3059-A5ED-4594-9FF4-015674C6F3F4}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{93E95C0E-C1A4-4494-A0FA-5429A7DF30DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{93E95C0E-C1A4-4494-A0FA-5429A7DF30DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{93E95C0E-C1A4-4494-A0FA-5429A7DF30DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
44-
{93E95C0E-C1A4-4494-A0FA-5429A7DF30DC}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{079C4B44-6179-4586-A15D-0A9F3A00907C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{079C4B44-6179-4586-A15D-0A9F3A00907C}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{079C4B44-6179-4586-A15D-0A9F3A00907C}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{079C4B44-6179-4586-A15D-0A9F3A00907C}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{EBE142FA-D5AE-4EA7-AC89-6EA38C75250E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{EBE142FA-D5AE-4EA7-AC89-6EA38C75250E}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{EBE142FA-D5AE-4EA7-AC89-6EA38C75250E}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{EBE142FA-D5AE-4EA7-AC89-6EA38C75250E}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{C1143F0C-1FBE-46A6-861D-30999CA4BED6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{C1143F0C-1FBE-46A6-861D-30999CA4BED6}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{C1143F0C-1FBE-46A6-861D-30999CA4BED6}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{C1143F0C-1FBE-46A6-861D-30999CA4BED6}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{D192AA4A-E37B-4F8D-A071-4DA100FC4FCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{D192AA4A-E37B-4F8D-A071-4DA100FC4FCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{D192AA4A-E37B-4F8D-A071-4DA100FC4FCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{D192AA4A-E37B-4F8D-A071-4DA100FC4FCF}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{3C350677-1B17-44C3-87C9-04AA0BEEBF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{3C350677-1B17-44C3-87C9-04AA0BEEBF44}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{3C350677-1B17-44C3-87C9-04AA0BEEBF44}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{3C350677-1B17-44C3-87C9-04AA0BEEBF44}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{F2EF809D-66DF-4869-A679-40C714667376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{F2EF809D-66DF-4869-A679-40C714667376}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{F2EF809D-66DF-4869-A679-40C714667376}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{F2EF809D-66DF-4869-A679-40C714667376}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{1FFBFDBE-6166-45CD-A729-874B98B0D7D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{1FFBFDBE-6166-45CD-A729-874B98B0D7D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{1FFBFDBE-6166-45CD-A729-874B98B0D7D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{1FFBFDBE-6166-45CD-A729-874B98B0D7D6}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{20792480-64B7-4708-B7F6-9E375FA85BA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{20792480-64B7-4708-B7F6-9E375FA85BA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{20792480-64B7-4708-B7F6-9E375FA85BA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{20792480-64B7-4708-B7F6-9E375FA85BA0}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{553139FF-9CA2-4374-9107-862107F89993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{553139FF-9CA2-4374-9107-862107F89993}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{553139FF-9CA2-4374-9107-862107F89993}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{553139FF-9CA2-4374-9107-862107F89993}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{3FCC12DB-E839-4AFC-8942-317EB7F2EEC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{3FCC12DB-E839-4AFC-8942-317EB7F2EEC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{3FCC12DB-E839-4AFC-8942-317EB7F2EEC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{3FCC12DB-E839-4AFC-8942-317EB7F2EEC5}.Release|Any CPU.Build.0 = Release|Any CPU
5757
EndGlobalSection
5858
EndGlobal

src/SecurityInsights/custom/New-AzSentinelAlertRule.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ function New-AzSentinelAlertRule {
9191

9292
[Parameter(ParameterSetName = 'MicrosoftSecurityIncidentCreation')]
9393
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
94-
[System.String]
94+
[System.String[]]
9595
${DisplayNamesFilter},
9696

9797
[Parameter(ParameterSetName = 'MicrosoftSecurityIncidentCreation')]
9898
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
99-
[System.String]
99+
[System.String[]]
100100
${DisplayNamesExcludeFilter},
101101

102102

@@ -148,7 +148,7 @@ function New-AzSentinelAlertRule {
148148
[Parameter(ParameterSetName = 'Scheduled')]
149149
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
150150
#[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AttackTactic]
151-
[System.String]
151+
[System.String[]]
152152
#InitialAccess, Execution, Persistence, PrivilegeEscalation, DefenseEvasion, CredentialAccess, Discovery, LateralMovement, Collection, Exfiltration, CommandAndControl, Impact, PreAttack
153153
${Tactic},
154154

@@ -190,7 +190,7 @@ function New-AzSentinelAlertRule {
190190
[Parameter(ParameterSetName = 'Scheduled')]
191191
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail])]
192192
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
193-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail]
193+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail[]]
194194
${GroupByAlertDetail},
195195

196196
[Parameter(ParameterSetName = 'NRT')]
@@ -203,15 +203,15 @@ function New-AzSentinelAlertRule {
203203
[Parameter(ParameterSetName = 'Scheduled')]
204204
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType])]
205205
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
206-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType]
206+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType[]]
207207
${GroupByEntity},
208208

209209

210210
[Parameter(ParameterSetName = 'NRT')]
211211
[Parameter(ParameterSetName = 'Scheduled')]
212212
#'Account', 'Host', 'IP', 'Malware', 'File', 'Process', 'CloudApplication', 'DNS', 'AzureResource', 'FileHash', 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', 'Mailbox', 'MailCluster', 'MailMessage', 'SubmissionMail'
213213
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
214-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.EntityMapping]
214+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.EntityMapping[]]
215215
${EntityMapping},
216216

217217
[Parameter(ParameterSetName = 'NRT')]
@@ -361,25 +361,25 @@ function New-AzSentinelAlertRule {
361361
}
362362

363363
If($PSBoundParameters['Description']){
364-
$AlertRule.Enabled = $PSBoundParameters['Description']
364+
$AlertRule.Description = $PSBoundParameters['Description']
365365
$null = $PSBoundParameters.Remove('Description')
366366
}
367367

368368
If($PSBoundParameters['DisplayNamesFilter']){
369-
$AlertRule.Enabled = $PSBoundParameters['DisplayNamesFilter']
369+
$AlertRule.DisplayNamesFilter = $PSBoundParameters['DisplayNamesFilter']
370370
$null = $PSBoundParameters.Remove('DisplayNamesFilter')
371371
}
372372

373373
If($PSBoundParameters['DisplayNamesExcludeFilter']){
374-
$AlertRule.Enabled = $PSBoundParameters['DisplayNamesExcludeFilter']
374+
$AlertRule.DisplayNamesExcludeFilter = $PSBoundParameters['DisplayNamesExcludeFilter']
375375
$null = $PSBoundParameters.Remove('DisplayNamesExcludeFilter')
376376
}
377377

378378
$AlertRule.ProductFilter = $PSBoundParameters['ProductFilter']
379379
$null = $PSBoundParameters.Remove('ProductFilter')
380380

381381
If($PSBoundParameters['SeveritiesFilter']){
382-
$AlertRule.Enabled = $PSBoundParameters['SeveritiesFilter']
382+
$AlertRule.SeveritiesFilter = $PSBoundParameters['SeveritiesFilter']
383383
$null = $PSBoundParameters.Remove('SeveritiesFilter')
384384
}
385385
}
@@ -417,7 +417,7 @@ function New-AzSentinelAlertRule {
417417
}
418418

419419
If($PSBoundParameters['Description']){
420-
$AlertRule.Enabled = $PSBoundParameters['Description']
420+
$AlertRule.Description = $PSBoundParameters['Description']
421421
$null = $PSBoundParameters.Remove('Description')
422422
}
423423

src/SecurityInsights/custom/Update-AzSentinelAlertRule.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ function Update-AzSentinelAlertRule {
149149
[Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')]
150150
[Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')]
151151
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
152-
[System.String]
152+
[System.String[]]
153153
${DisplayNamesFilter},
154154

155155
[Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')]
156156
[Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')]
157157
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
158-
[System.String]
158+
[System.String[]]
159159
${DisplayNamesExcludeFilter},
160160

161161

@@ -222,7 +222,7 @@ function Update-AzSentinelAlertRule {
222222
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AttackTactic])]
223223
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
224224
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AttackTactic]
225-
[System.String]
225+
[System.String[]]
226226
${Tactic},
227227

228228

@@ -276,7 +276,7 @@ function Update-AzSentinelAlertRule {
276276
[Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')]
277277
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail])]
278278
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
279-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail]
279+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail[]]
280280
${GroupByAlertDetail},
281281

282282
[Parameter(ParameterSetName = 'UpdateNRT')]
@@ -293,7 +293,7 @@ function Update-AzSentinelAlertRule {
293293
[Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')]
294294
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType])]
295295
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
296-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType]
296+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType[]]
297297
${GroupByEntity},
298298

299299

@@ -303,7 +303,7 @@ function Update-AzSentinelAlertRule {
303303
[Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')]
304304
#'Account', 'Host', 'IP', 'Malware', 'File', 'Process', 'CloudApplication', 'DNS', 'AzureResource', 'FileHash', 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', 'Mailbox', 'MailCluster', 'MailMessage', 'SubmissionMail'
305305
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')]
306-
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.EntityMapping]
306+
[Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.EntityMapping[]]
307307
${EntityMapping},
308308

309309
[Parameter(ParameterSetName = 'UpdateNRT')]
@@ -482,17 +482,17 @@ function Update-AzSentinelAlertRule {
482482
}
483483

484484
If($PSBoundParameters['Description']){
485-
$AlertRule.Enabled = $PSBoundParameters['Description']
485+
$AlertRule.Description = $PSBoundParameters['Description']
486486
$null = $PSBoundParameters.Remove('Description')
487487
}
488488

489489
If($PSBoundParameters['DisplayNamesFilter']){
490-
$AlertRule.Enabled = $PSBoundParameters['DisplayNamesFilter']
490+
$AlertRule.DisplayNamesFilter = $PSBoundParameters['DisplayNamesFilter']
491491
$null = $PSBoundParameters.Remove('DisplayNamesFilter')
492492
}
493493

494494
If($PSBoundParameters['DisplayNamesExcludeFilter']){
495-
$AlertRule.Enabled = $PSBoundParameters['DisplayNamesExcludeFilter']
495+
$AlertRule.DisplayNamesExcludeFilter = $PSBoundParameters['DisplayNamesExcludeFilter']
496496
$null = $PSBoundParameters.Remove('DisplayNamesExcludeFilter')
497497
}
498498

@@ -502,7 +502,7 @@ function Update-AzSentinelAlertRule {
502502
}
503503

504504
If($PSBoundParameters['SeveritiesFilter']){
505-
$Parameter.Enabled = $PSBoundParameters['SeveritiesFilter']
505+
$Parameter.SeveritiesFilter = $PSBoundParameters['SeveritiesFilter']
506506
$null = $PSBoundParameters.Remove('SeveritiesFilter')
507507
}
508508
}
@@ -540,7 +540,7 @@ function Update-AzSentinelAlertRule {
540540
}
541541

542542
If($PSBoundParameters['Description']){
543-
$AlertRule.Enabled = $PSBoundParameters['Description']
543+
$AlertRule.Description = $PSBoundParameters['Description']
544544
$null = $PSBoundParameters.Remove('Description')
545545
}
546546

@@ -606,7 +606,7 @@ function Update-AzSentinelAlertRule {
606606
$null = $PSBoundParameters.Remove('LookbackDuration')
607607
}
608608

609-
If($PSBoundParameters['LookbackDuration']){
609+
If($PSBoundParameters['MatchingMethod']){
610610
$AlertRule.GroupingConfigurationMatchingMethod = $PSBoundParameters['MatchingMethod']
611611
$null = $PSBoundParameters.Remove('MatchingMethod')
612612
}
@@ -669,7 +669,7 @@ function Update-AzSentinelAlertRule {
669669
}
670670

671671
If($PSBoundParameters['Description']){
672-
$AlertRule.Enabled = $PSBoundParameters['Description']
672+
$AlertRule.Description = $PSBoundParameters['Description']
673673
$null = $PSBoundParameters.Remove('Description')
674674
}
675675

@@ -795,7 +795,7 @@ function Update-AzSentinelAlertRule {
795795
$null = $PSBoundParameters.Remove('TriggerOperator')
796796
}
797797

798-
If($PSBoundParameters['TriggerThreshold'] -ne $null){
798+
If($null -ne $PSBoundParameters['TriggerThreshold']){
799799
$AlertRule.TriggerThreshold = $PSBoundParameters['TriggerThreshold']
800800
$null = $PSBoundParameters.Remove('TriggerThreshold')
801801
}

0 commit comments

Comments
 (0)