共用方式為


Update-AzIotSecuritySolution

在IoT安全性解決方案中更新下列一或多個屬性:標籤、建議設定、使用者定義資源

語法

Update-AzIotSecuritySolution
      -Name <String>
      -ResourceGroupName <String>
      [-Tag <Hashtable>]
      [-UserDefinedResource <PSUserDefinedResources>]
      [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzIotSecuritySolution
      -ResourceId <String>
      [-Tag <Hashtable>]
      [-UserDefinedResource <PSUserDefinedResources>]
      [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzIotSecuritySolution
      -InputObject <PSIotSecuritySolution>
      [-Tag <Hashtable>]
      [-UserDefinedResource <PSUserDefinedResources>]
      [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzIotSecuritySolution Cmdlet 會在特定的 IoT 安全性解決方案中更新一或多個下列屬性:卷標、建議設定、使用者定義資源。 只有指定的屬性會在 iot 安全性解決方案內更新。 IoT 安全性解決方案會從 iot 裝置和 iot 中樞收集安全性數據和事件,以協助防止和偵測威脅。

範例

範例 1

$RecConfig = New-AzIotSecuritySolutionRecommendationConfigurationObject -RecommendationType "IoT_OpenPorts" -Enabled $false
$UserDefinedResource = New-AzIotSecuritySolutionUserDefinedResourcesObject -Query 'where type != "microsoft.devices/iothubs" | where name contains "v2"' `
-QuerySubscriptionList @("XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX")
Update-AzIotSecuritySolution -Name "MySample" -ResourceGroupName "MyResourceGroup" -RecommendationsConfiguration @($RecConfig) -UserDefinedResource $UserDefinedResource

Id: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Security/IoTSecuritySolutions/MySample"
Name: "MySample"
Type: "Microsoft.Security/IoTSecuritySolutions"
Location: "westus"
DisplayName: "MySample"
status: "Enabled"
Export: ["RawEvents"]
DisabledDataSources: ["TwinData"]
Workspace: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/MyResourceGroup/providers/microsoft.operationalinsights/workspaces/MyLA"
AdditionalWorkspaces: null
IotHubs: ["/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/MyResourceGroup/providers/microsoft.devices/iothubs/MySample"]
UserDefinedResources: {
	Query: 'where type != "microsoft.devices/iothubs" | where name contains "v2"' 
	QuerySubscriptions: ["XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"]
}
RecommendationsConfiguration: [
{
	RecommendationType: "IoT_ACRAuthentication"
	Name: "Service prinicpal not used with ACR repository"
	Status: "Enabled"
}
{
	RecommendationType: "IoT_OpenPorts"
	Name: "Device has open port"
	Status: "Disabled"
}
{
	RecommendationType: "IoT_AgentSendsUnutilizedMessages"
	Name: "Agent sending underutilized messages"
	Status: "Enabled"
}]
AutoDiscoveredResources: ["/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/MyResourceGroup/providers/microsoft.devices/iothubs/MySample"]
UnmaskedIpLoggingStatus: "Enabled"

使用建議組態和使用者定義資源,從資源群組 “MyResourceGroup” 更新 iot 安全性解決方案 “MySample”

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

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

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

-InputObject

Input 物件。

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

-Name

資源名稱。

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

-RecommendationsConfiguration

建議設定。

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

-ResourceGroupName

資源組名。

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

-ResourceId

您要叫用命令之安全性資源的識別碼。

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

-Tag

標籤。

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

-UserDefinedResource

使用者定義的資源。

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出