Set-​Azure​Rm​Iot​Hub

Updates the properties of an IotHub.

Syntax

Set-AzureRmIotHub
   [-ResourceGroupName] <String>
   [-Name] <String>
   -CloudToDevice <PSCloudToDeviceProperties>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmIotHub
   [-ResourceGroupName] <String>
   [-Name] <String>
   -EnableFileUploadNotifications <Boolean>
   [-FileUploadContainerName <String>]
   [-FileUploadNotificationMaxDeliveryCount <Int32>]
   [-FileUploadNotificationTtl <TimeSpan>]
   [-FileUploadSasUriTtl <TimeSpan>]
   [-FileUploadStorageConnectionString <String>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmIotHub
   [-ResourceGroupName] <String>
   [-Name] <String>
   -EventHubRetentionTimeInDays <Int64>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmIotHub
   [-ResourceGroupName] <String>
   [-Name] <String>
   -OperationsMonitoringProperties <PSOperationsMonitoringProperties>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmIotHub
   [-ResourceGroupName] <String>
   [-Name] <String>
   -SkuName <PSIotHubSku>
   [-Units <Int64>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Updates the properties of an IotHub.

Examples

Example 1 Update the sku

PS C:\> Set-AzureRmIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -SkuName S1 -Units 5

Update the sku to S1 and units to 5 for the IotHub named "myiothub"

Example 2 Update the eventhub properties

PS C:\> Set-AzureRmIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubRetentionTimeInDays 4

Update the retention time in days to 4 for both the telemetry and operationsmonitoringevents events for the IotHub named "myiothub"

Required Parameters

-CloudToDevice

The properties for the cloud to device command queue.

Type:PSCloudToDeviceProperties
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableFileUploadNotifications

Flag that specifies whether notifications should be enabled for file upload.

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

Retention time in days.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Name of the IoT hub.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-OperationsMonitoringProperties

The properties related to operations monitoring.

Type:PSOperationsMonitoringProperties
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Name of hte resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SkuName

Name of the Sku.

Type:PSIotHubSku
Parameter Sets:F1, S1, S2, S3
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

The name of the container to upload the files to.

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

The maximum delivery count for file upload notifications.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileUploadNotificationTtl

Time to live value for the messages in the file upload notification queue.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileUploadSasUriTtl

Time to live for the for the SAS Uri thats generated for file upload.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileUploadStorageConnectionString

The storage connection string to upload the files to.

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

The number of units.

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

Inputs

System.String

Outputs

Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub