Edit

Share via


Set-AzIoTDeviceProvisioningServiceEnrollmentGroup

Update a device enrollment group.

Syntax

ResourceSet (Default)

Set-AzIoTDeviceProvisioningServiceEnrollmentGroup
    [-ResourceGroupName] <String>
    [-DpsName] <String>
    -Name <String>
    [-ReprovisionPolicy <PSReprovisionType>]
    [-EdgeEnabled <Boolean>]
    [-Tag <Hashtable>]
    [-Desired <Hashtable>]
    [-AllocationPolicy <PSAllocationPolicy>]
    [-ProvisioningStatus <PSProvisioningStatus>]
    [-IotHubHostName <String>]
    [-IotHub <String[]>]
    [-WebhookUrl <String>]
    [-ApiVersion <String>]
    [-PrimaryKey <String>]
    [-SecondaryKey <String>]
    [-PrimaryCertificate <String>]
    [-SecondaryCertificate <String>]
    [-RootCertificate]
    [-PrimaryCAName <String>]
    [-SecondaryCAName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

InputObjectSet

Set-AzIoTDeviceProvisioningServiceEnrollmentGroup
    [-DpsObject] <PSProvisioningServiceDescription>
    -Name <String>
    [-ReprovisionPolicy <PSReprovisionType>]
    [-EdgeEnabled <Boolean>]
    [-Tag <Hashtable>]
    [-Desired <Hashtable>]
    [-AllocationPolicy <PSAllocationPolicy>]
    [-ProvisioningStatus <PSProvisioningStatus>]
    [-IotHubHostName <String>]
    [-IotHub <String[]>]
    [-WebhookUrl <String>]
    [-ApiVersion <String>]
    [-PrimaryKey <String>]
    [-SecondaryKey <String>]
    [-PrimaryCertificate <String>]
    [-SecondaryCertificate <String>]
    [-RootCertificate]
    [-PrimaryCAName <String>]
    [-SecondaryCAName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ResourceIdSet

Set-AzIoTDeviceProvisioningServiceEnrollmentGroup
    [-ResourceId] <String>
    -Name <String>
    [-ReprovisionPolicy <PSReprovisionType>]
    [-EdgeEnabled <Boolean>]
    [-Tag <Hashtable>]
    [-Desired <Hashtable>]
    [-AllocationPolicy <PSAllocationPolicy>]
    [-ProvisioningStatus <PSProvisioningStatus>]
    [-IotHubHostName <String>]
    [-IotHub <String[]>]
    [-WebhookUrl <String>]
    [-ApiVersion <String>]
    [-PrimaryKey <String>]
    [-SecondaryKey <String>]
    [-PrimaryCertificate <String>]
    [-SecondaryCertificate <String>]
    [-RootCertificate]
    [-PrimaryCAName <String>]
    [-SecondaryCAName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Update an enrollment group in an Azure IoT Hub Device Provisioning Service.

Examples

Example 1

Set-AzIoTDeviceProvisioningServiceEnrollmentGroup -ResourceGroupName "myresourcegroup" -DpsName "mydps" -Name "enroll1" -AllocationPolicy Hashed -IotHub "hub1","hub2"

Update allocation policy and hubs for an enrollment group.

Example 2

$tag = @{}
$tag.Add("environment","updatedenv")
$desired = @{}
$desired.add("version_dps", "updateddps")
Set-AzIoTDeviceProvisioningServiceEnrollmentGroup -ResourceGroupName "myresourcegroup" -DpsName "mydps" -Name "enroll1" -tag $tag -Desired $desired

Update an enrollment group's initial twin state.

Example 3

Set-AzIoTDeviceProvisioningServiceEnrollmentGroup -ResourceGroupName "myresourcegroup" -DpsName "mydps" -Name "enroll1" -PrimaryKey "newPrimaryKey" -SecondaryKey "newSecondaryKey"

Update a symmetric key enrollment group's primary and secondary keys

Parameters

-AllocationPolicy

Type of allocation for device assigned to the Hub.

Parameter properties

Type:PSAllocationPolicy
Default value:None
Accepted values:Hashed, GeoLatency, Static, Custom
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApiVersion

The API version of the provisioning service in the custom allocation request.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Desired

Initial twin desired properties.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DpsName

Name of the IoT Device Provisioning Service

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DpsObject

IoT Device Provisioning Service Object

Parameter properties

Type:PSProvisioningServiceDescription
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObjectSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-EdgeEnabled

Flag indicating edge enablement.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IotHub

Host name of target IoT Hub. Use space-separated list for multiple IoT Hubs.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IotHubHostName

Host name of the target IoT Hub.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the enrollment group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryCAName

The name of the primary root CA certificate. If attestation with a root CA certificate is desired then a root ca name must be provided.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryCertificate

The path to the file containing the primary certificate. Base-64 representation of X509 certificate .cer file or .pem file path.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryKey

The primary symmetric shared access key stored in base64 format.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProvisioningStatus

Enable or disable enrollment entry.

Parameter properties

Type:PSProvisioningStatus
Default value:None
Accepted values:Enabled, Disabled
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReprovisionPolicy

Device data to be handled on re-provision to different Iot Hub.

Parameter properties

Type:PSReprovisionType
Default value:None
Accepted values:reprovisionandmigratedata, reprovisionandresetdata, never
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Name of the Resource Group

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

IoT Device Provisioning Service Resource Id

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceIdSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RootCertificate

Allows to create X509attestation using root certificates.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondaryCAName

The name of the secondary root CA certificate. If attestation with a root CA certificate is desired then a root ca name must be provided.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondaryCertificate

The path to the file containing the secondary certificate. Base-64 representation of X509 certificate .cer file or .pem file path.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondaryKey

The secondary symmetric shared access key stored in base64 format.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tag

Initial twin tags.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebhookUrl

The webhook URL used for custom allocation requests.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSProvisioningServiceDescription

String

Outputs

PSEnrollmentGroup