共用方式為


New-AzDeviceSecurityGroupAllowlistCustomAlertRuleObject

為裝置安全組建立新的允許清單自訂警示規則 (IoT 安全性)

語法

New-AzDeviceSecurityGroupAllowlistCustomAlertRuleObject
   -Enabled <Boolean>
   -Type <String>
   -AllowlistValue <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzDeviceSecurityGroupAllowlistCustomAlertRuleObject Cmdlet 會為 IoT 安全性解決方案中的裝置安全組建立允許自定義警示規則的新列表。

範例

範例 1

New-AzDeviceSecurityGroupAllowlistCustomAlertRuleObject -Enabled $false -Type "LocalUserNotAllowed" -AllowlistValue @()

RuleType: "LocalUserNotAllowed"
DisplayName: "Login by a local user that isn't allowed"
Description: "Get an alert when a local user that isn't allowed logins to the device"
IsEnabled: false
ValueType: "String"
AllowlistValues: []

從類型 「LocalUserNotAllowed」 建立新的允許清單自定義警示,並將狀態設定為停用

參數

-AllowlistValue

允許清單值。

類型:String[]
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Enabled

已啟用規則。

類型:Boolean
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Type

規則類型:

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

PSAllowlistCustomAlertRule