Reset-AzStorageSyncServerCertificate

Use for troubleshooting only. This command will roll the storage sync server certificate used to describe the server identity to the storage sync service.

Syntax

Reset-AzStorageSyncServerCertificate
     [-ResourceGroupName] <String>
     [-StorageSyncServiceName] <String>
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Reset-AzStorageSyncServerCertificate
     [-ParentObject] <PSStorageSyncService>
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Reset-AzStorageSyncServerCertificate
     [-ParentResourceId] <String>
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

This command will roll storage sync server certificate used to describe the server identity to the storage sync service. This is meant for to be used in troubleshooting scenarios. When calling this command, the server certificate is replaced, updating the storage sync service this server is registered with as well, by submitting the public part of the key. Since a new certificate is generated, the expiration time of this cert is also updated. This command can also be used to update an expired certificate. This can happen if a server is offline for an extended period of time.

Examples

Example 1

Reset-AzStorageSyncServerCertificate -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName"

This command will roll the local server certificate and inform the corresponding storage sync service of the server's new identity, in a secure way.

Parameters

-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

-ParentObject

StorageSyncService Object, normally passed through the parameter.

Type:PSStorageSyncService
Aliases:StorageSyncService
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ParentResourceId

StorageSyncService Parent Resource Id

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

-PassThru

In normal execution, this cmdlet returns no value on success. If you provide the PassThru parameter, then the cmdlet will write a value to the pipeline after successful execution.

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

-ResourceGroupName

Resource Group Name.

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

-StorageSyncServiceName

Name of the StorageSyncService.

Type:String
Aliases:ParentName
Position:1
Default value:None
Required:True
Accept pipeline input:True
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

String

PSStorageSyncService

Outputs

Object