Set-AzIoTDeviceProvisioningServiceEnrollmentGroup

Update a device enrollment group.

Syntax

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>]
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>]
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.

Type:PSAllocationPolicy
Accepted values:Hashed, GeoLatency, Static, Custom
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ApiVersion

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

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

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

-Desired

Initial twin desired properties.

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

-DpsName

Name of the IoT Device Provisioning Service

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

-DpsObject

IoT Device Provisioning Service Object

Type:PSProvisioningServiceDescription
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-EdgeEnabled

Flag indicating edge enablement.

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

-IotHub

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

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

-IotHubHostName

Host name of the target IoT Hub.

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

-Name

Name of the enrollment group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

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

-PrimaryCertificate

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

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

-PrimaryKey

The primary symmetric shared access key stored in base64 format.

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

-ProvisioningStatus

Enable or disable enrollment entry.

Type:PSProvisioningStatus
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReprovisionPolicy

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

Type:PSReprovisionType
Accepted values:reprovisionandmigratedata, reprovisionandresetdata, never
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the Resource Group

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

-ResourceId

IoT Device Provisioning Service Resource Id

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

-RootCertificate

Allows to create X509attestation using root certificates.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-SecondaryCertificate

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

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

-SecondaryKey

The secondary symmetric shared access key stored in base64 format.

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

-Tag

Initial twin tags.

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

-WebhookUrl

The webhook URL used for custom allocation requests.

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

-WhatIf

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

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

Inputs

PSProvisioningServiceDescription

String

Outputs

PSEnrollmentGroup