Delen via


Set-AzDeviceSecurityGroup

Apparaatbeveiligingsgroep maken of bijwerken

Syntax

Set-AzDeviceSecurityGroup
   -Name <String>
   -HubResourceId <String>
   [-ThresholdRule <PSThresholdCustomAlertRule[]>]
   [-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
   [-AllowlistRule <PSAllowlistCustomAlertRule[]>]
   [-DenylistRule <PSDenylistCustomAlertRule[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzDeviceSecurityGroup
   [-ThresholdRule <PSThresholdCustomAlertRule[]>]
   [-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
   [-AllowlistRule <PSAllowlistCustomAlertRule[]>]
   [-DenylistRule <PSDenylistCustomAlertRule[]>]
   -InputObject <PSDeviceSecurityGroup>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzDeviceSecurityGroup
   [-ThresholdRule <PSThresholdCustomAlertRule[]>]
   [-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
   [-AllowlistRule <PSAllowlistCustomAlertRule[]>]
   [-DenylistRule <PSDenylistCustomAlertRule[]>]
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Met de cmdlet Set-AzDeviceSecurityGroup wordt een apparaatbeveiligingsgroep gemaakt of bijgewerkt die is gedefinieerd in de iot-beveiligingsoplossing.

Voorbeelden

Voorbeeld 1

$TimeWindowSize = New-TimeSpan -Minutes 5
$TimeWindowRule = New-AzDeviceSecurityGroupTimeWindowRuleObject -Type "ActiveConnectionsNotInAllowedRange" -Enabled $true `
-MaxThreshold 30 -MinThreshold 0 -TimeWindowSize $TimeWindowSize
Set-AzDeviceSecurityGroup -Name "MySecurityGroup" `
-HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" `
-TimeWindowRule $TimeWindowRules

Id: "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub/providers/Microsoft.Security/deviceSecurityGroups/MySecurityGroup"
Name: "MySecurityGroup"
Type: "Microsoft.Security/deviceSecurityGroups"
ThresholdRules: []
TimeWindowRules: [
			{
              RuleType: "ActiveConnectionsNotInAllowedRange"
              DisplayName: "Number of active connections is not in allowed range"
              Description: "Get an alert when the number of active connections of a device in the time window is not in the allowed range"
              IsEnabled: true
              MinThreshold: 0
              MaxThreshold: 0
              TimeWindowSize: "PT5M"
            }]
AllowlistRules: [
			{
              RuleType": "ConnectionToIpNotAllowed",
              DisplayName: "Outbound connection to an ip that isn't allowed"
              Description: "Get an alert when an outbound connection is created between your device and an ip that isn't allowed"
              IsEnabled: false
              ValueType: "IpCidr"
              AllowlistValues: []
            },
            {
              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: []
            }]
DenylistRules: []

Bestaande apparaatbeveiligingsgroep bijwerken vanuit IoT Hub "/subscriptions/XXXXXXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" met regeltype "Active Verbinding maken ionsNotInAllowedRange"

Parameters

-AllowlistRule

Lijstregels toestaan.

Type:PSAllowlistCustomAlertRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DenylistRule

Lijstregels weigeren.

Type:PSDenylistCustomAlertRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HubResourceId

IoT Hub-resource-id.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Invoerobject.

Type:PSDeviceSecurityGroup
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Resourcenaam.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

Id van de beveiligingsresource waarvoor u de opdracht wilt aanroepen.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ThresholdRule

Drempelwaarden.

Type:PSThresholdCustomAlertRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TimeWindowRule

Tijdvensterregels.

Type:PSTimeWindowCustomAlertRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Invoerwaarden

PSThresholdCustomAlertRule[]

PSTimeWindowCustomAlertRule[]

PSAllowlistCustomAlertRule[]

PSDenylistCustomAlertRule[]

PSDeviceSecurityGroup

String

Uitvoerwaarden

PSDeviceSecurityGroup