Edit

Share via


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

StringParameterSet (Default)

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

ObjectParameterSet

Reset-AzStorageSyncServerCertificate
    [-ParentObject] <PSStorageSyncService>
    [-PassThru]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParentStringParameterSet

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.

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

-ParentObject

StorageSyncService Object, normally passed through the parameter.

Parameter properties

Type:PSStorageSyncService
Default value:None
Supports wildcards:False
DontShow:False
Aliases:StorageSyncService

Parameter sets

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

-ParentResourceId

StorageSyncService Parent Resource Id

Parameter properties

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

Parameter sets

ParentStringParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

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

-ResourceGroupName

Resource Group Name.

Parameter properties

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

Parameter sets

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

-StorageSyncServiceName

Name of the StorageSyncService.

Parameter properties

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

Parameter sets

StringParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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

String

PSStorageSyncService

Outputs

Object