Set-AzDeviceSecurityGroup
Apparaatbeveiligingsgroep maken of bijwerken
Syntaxis
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 Set-AzDeviceSecurityGroup cmdlet 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-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" met regeltype "ActiveConnectionsNotInAllowedRange"
Parameters
-AllowlistRule
Lijstregels toestaan.
Type: | PSAllowlistCustomAlertRule[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Confirm
U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DenylistRule
Lijstregels weigeren.
Type: | PSDenylistCustomAlertRule[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-HubResourceId
IoT Hub-resource-id.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputObject
Invoerobject.
Type: | PSDeviceSecurityGroup |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Name
Resourcenaam.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceId
Id van de beveiligingsresource waarvoor u de opdracht wilt aanroepen.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-ThresholdRule
Drempelwaarden.
Type: | PSThresholdCustomAlertRule[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-TimeWindowRule
Tijdvensterregels.
Type: | PSTimeWindowCustomAlertRule[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-WhatIf
Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
Uitvoerwaarden
Azure PowerShell