你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzIotSecuritySolution

创建或更新 IoT 安全解决方案

语法

Set-AzIotSecuritySolution
   -Name <String>
   -ResourceGroupName <String>
   [-Tag <Hashtable>]
   -Location <String>
   -Workspace <String>
   -DisplayName <String>
   [-Enabled <Boolean>]
   [-Export <String[]>]
   [-DisabledDataSource <String[]>]
   -IotHub <String[]>
   [-UserDefinedResource <PSUserDefinedResources>]
   [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
   [-UnmaskedIpLoggingStatus <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotSecuritySolution
   -InputObject <PSIotSecuritySolution>
   [-Tag <Hashtable>]
   -Location <String>
   -Workspace <String>
   -DisplayName <String>
   [-Enabled <Boolean>]
   [-Export <String[]>]
   [-DisabledDataSource <String[]>]
   -IotHub <String[]>
   [-UserDefinedResource <PSUserDefinedResources>]
   [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
   [-UnmaskedIpLoggingStatus <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotSecuritySolution
   -ResourceId <String>
   [-Tag <Hashtable>]
   -Location <String>
   -Workspace <String>
   -DisplayName <String>
   [-Enabled <Boolean>]
   [-Export <String[]>]
   [-DisabledDataSource <String[]>]
   -IotHub <String[]>
   [-UserDefinedResource <PSUserDefinedResources>]
   [-RecommendationsConfiguration <PSRecommendationConfiguration[]>]
   [-UnmaskedIpLoggingStatus <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

说明

Set-AzIotSecuritySolution cmdlet 创建或更新特定的 iot 安全解决方案。 IoT 安全解决方案从 iot 设备和 iot 中心收集安全数据和事件,以帮助防止和检测威胁。 iot 安全解决方案的名称应与 iot 中心的名称相同。

示例

示例 1

$Workspace = "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MichalResourceGroup/providers/Microsoft.OperationalInsights/workspaces/IoTHubWorkspace"
$IotHubs = @("/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MichalResourceGroup/providers/Microsoft.Devices/IotHubs/MySample")
Set-AzIotSecuritySolution -Name "MySample" -ResourceGroupName "MyResourceGroup" -Location "West US" `
-Workspace $Workspace -DisplayName "MySample" -Enabled $true -IotHub $IotHubs

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: "" 
	QuerySubscriptions: []
}
RecommendationsConfiguration: [
{
	RecommendationType: "IoT_ACRAuthentication"
	Name: "Service prinicpal not used with ACR repository"
	Status: "Enabled"
}
{
	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"
Tags: {}

使用资源 ID“/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXX-XXXXXXXXXXXXXXXXXX/resourceGroups/MichalResourceGroup/providers/Microsoft.Devices/IotHubs/MySample”为 IoT 中心创建新的 iot 安全解决方案“MySample”, (解决方案的名称应与 IoT 中心的名称相同)

参数

-Confirm

提示你在运行 cmdlet 之前进行确认。

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

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

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

-DisabledDataSource

禁用的数据源。

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

-DisplayName

显示名称。

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

-Enabled

地位。

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Export

导出数据。

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

-InputObject

输入对象。

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

-IotHub

IoT 中心。

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

-Location

位置。

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

-Name

资源名称。

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

-RecommendationsConfiguration

建议配置。

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

-ResourceGroupName

资源组名称。

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

-ResourceId

要在其中调用命令的安全资源的 ID。

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

-Tag

标记。

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-UnmaskedIpLoggingStatus

未屏蔽的 IP 日志记录状态。

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

-UserDefinedResource

用户定义的资源。

Type:PSUserDefinedResources
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

显示在此 cmdlet 运行的情况下将会发生什么。 此 cmdlet 未运行。

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

-Workspace

工作区 ID。

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

输入

PSIotSecuritySolution

String

Hashtable

String[]

PSUserDefinedResources

PSRecommendationConfiguration[]

输出

PSIotSecuritySolution