Unregister-AzStorageSyncServer

Warning: Unregistering a server will result in cascading deletes of all server endpoints on this server. This command will unregister a server from it's storage sync service.

Syntax

Unregister-AzStorageSyncServer
          [-ResourceGroupName] <String>
          [-StorageSyncServiceName] <String>
          [-ServerId] <Guid>
          [-Force]
          [-PassThru]
          [-AsJob]
          [-DefaultProfile <IAzureContextContainer>]
          [-WhatIf]
          [-Confirm]
          [<CommonParameters>]
Unregister-AzStorageSyncServer
          [-InputObject] <PSRegisteredServer>
          [-Force]
          [-PassThru]
          [-AsJob]
          [-DefaultProfile <IAzureContextContainer>]
          [-WhatIf]
          [-Confirm]
          [<CommonParameters>]
Unregister-AzStorageSyncServer
          [-ResourceId] <String>
          [-Force]
          [-PassThru]
          [-AsJob]
          [-DefaultProfile <IAzureContextContainer>]
          [-WhatIf]
          [-Confirm]
          [<CommonParameters>]

Description

This command will unregister a server from the storage sync service. Warning: Unregistering a server will result in cascading deletes of all server endpoints on this server. It should only be called when you are certain that no path on this server is to be synced anymore.

Examples

Example 1

$RegisteredServer = Get-AzStorageSyncServer -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName"
Unregister-AzStorageSyncServer -Force -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName" -ServerId $RegisteredServer.ServerId

This command will unregister the server, causing cascading deletes of all server endpoints on this server.

Parameters

-AsJob

Run cmdlet in the background

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

-Confirm

Prompts 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

-Force

Supply -Force to skip confirmation of this command.

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

-InputObject

RegisteredServer Input Object, normally passed through the pipeline.

Type:PSRegisteredServer
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:False
Accept wildcard characters:False

-ResourceId

RegisteredServer Resource Id

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

-ServerId

Name of the RegisteredServer.

Type:Guid
Aliases:RegisteredServerName
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageSyncServiceName

Name of the StorageSyncService.

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

PSRegisteredServer

String

SwitchParameter

Outputs

Object