你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzSentinelAlertRule
获取警报规则。
语法
Get-AzSentinelAlertRule
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
-WorkspaceName <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzSentinelAlertRule
-ResourceGroupName <String>
-RuleId <String>
[-SubscriptionId <String[]>]
-WorkspaceName <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzSentinelAlertRule
-InputObject <ISecurityInsightsIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
获取警报规则。
示例
示例 1:列出所有警报规则
Get-AzSentinelAlertRule -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName"
AlertDisplayName : (Preview) TI map IP entity to SigninLogs
FriendlyName : (Preview) TI map IP entity to SigninLogs
Description : Identifies a match in SigninLogs from any IP IOC from TI
Kind : SecurityAlert
Name : d1e4d1dd-8d16-1aed-59bd-a256266d7244
ProductName : Azure Sentinel
Status : New
ProviderAlertId : d6c7a42b-c0da-41ef-9629-b3d2d407b181
Tactic : {Impact}
此命令列出 Microsoft Sentinel 工作区下的所有警报规则。
示例 2:获取警报规则
Get-AzSentinelAlertRule -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName" -RuleId "d6c7a42b-c0da-41ef-9629-b3d2d407b181"
AlertDisplayName : (Preview) TI map IP entity to SigninLogs
FriendlyName : (Preview) TI map IP entity to SigninLogs
Description : Identifies a match in SigninLogs from any IP IOC from TI
Kind : SecurityAlert
Name : d1e4d1dd-8d16-1aed-59bd-a256266d7244
ProductName : Azure Sentinel
Status : New
ProviderAlertId : d6c7a42b-c0da-41ef-9629-b3d2d407b181
Tactic : {Impact}
此命令获取警报规则。
示例 3:按对象 ID 获取警报规则
$rules = Get-AzSentinelAlertRule -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName"
$rules[0] | Get-AzSentinelAlertRule
AlertDisplayName : (Preview) TI map IP entity to SigninLogs
FriendlyName : (Preview) TI map IP entity to SigninLogs
Description : Identifies a match in SigninLogs from any IP IOC from TI
Kind : SecurityAlert
Name : d1e4d1dd-8d16-1aed-59bd-a256266d7244
ProductName : Azure Sentinel
Status : New
ProviderAlertId : d6c7a42b-c0da-41ef-9629-b3d2d407b181
Tactic : {Impact}
此命令按对象获取警报规则
参数
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
Type: | ISecurityInsightsIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
资源组的名称。 此名称不区分大小写。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RuleId
警报规则 ID
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
目标订阅的 ID。
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WorkspaceName
工作区的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |