編輯

共用方式為


New-AzStorageSyncServerEndpoint

This command creates a new server endpoint on a registered server. This enables the specified path on the server to start syncing the files with other endpoints in the sync group.

Syntax

New-AzStorageSyncServerEndpoint
   [-ResourceGroupName] <String>
   [-StorageSyncServiceName] <String>
   [-SyncGroupName] <String>
   -Name <String>
   -ServerResourceId <String>
   -ServerLocalPath <String>
   [-CloudTiering]
   [-VolumeFreeSpacePercent <Int32>]
   [-TierFilesOlderThanDays <Int32>]
   [-InitialDownloadPolicy <String>]
   [-LocalCacheMode <String>]
   [-InitialUploadPolicy <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzStorageSyncServerEndpoint
   [-ParentObject] <PSSyncGroup>
   -Name <String>
   -ServerResourceId <String>
   -ServerLocalPath <String>
   [-CloudTiering]
   [-VolumeFreeSpacePercent <Int32>]
   [-TierFilesOlderThanDays <Int32>]
   [-InitialDownloadPolicy <String>]
   [-LocalCacheMode <String>]
   [-InitialUploadPolicy <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzStorageSyncServerEndpoint
   [-ParentResourceId] <String>
   -Name <String>
   -ServerResourceId <String>
   -ServerLocalPath <String>
   [-CloudTiering]
   [-VolumeFreeSpacePercent <Int32>]
   [-TierFilesOlderThanDays <Int32>]
   [-InitialDownloadPolicy <String>]
   [-LocalCacheMode <String>]
   [-InitialUploadPolicy <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This command creates a new server endpoint on a registered server. This enables the specified path on the server to start syncing the files with other endpoints in the sync group. If there are already files on other endpoints in the sync group and this newly added location also contains files, a reconciliation process will attempt to determine if files are in fact the same ones in the same folders as on other endpoints. The namespaces will merge and reconciliation helps to prevent conflict files. If there are files on other server endpoints it is often better to start with an empty location on this server, so that the files from the cloud come down to the server in an automatic process called fast disaster recovery. Namespace metadata will be synced down first, then the data stream of each file is downloaded. If a file is requested by a user or application out of download order, that file will be recalled with priority to satisfy the access request. You can optionally use cloud tiering on this server endpoint to determine if this endpoint is supposed to become a cache of the complete set of files from the cloud. If cloud tiering is used, then the file content download will stop at the point defined by the cloud tiering policies you can set.

Examples

Example 1

$RegisteredServer = Get-AzStorageSyncServer -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName"
New-AzStorageSyncServerEndpoint -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName" -SyncGroupName "mySyncGroupName" -Name "myServerEndpointName" -ServerResourceId $RegisteredServer.ResourceId -ServerLocalPath "myServerLocalPath" -CloudTiering -TierFilesOlderThanDays "myTierFilesOlderThanDays"

This command creates a new server endpoint on a registered server and inserts it into a sync group. THis way it is part of a topology of other endpoints and file metadata and content will immediately start to sync between all locations referenced as endpoints in the sync group.

Parameters

-AsJob

Run cmdlet in the background

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

-CloudTiering

Cloud Tiering Parameter

Type:SwitchParameter
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

-InitialDownloadPolicy

Initial download policy Parameter

Type:String
Accepted values:AvoidTieredFiles, NamespaceOnly, NamespaceThenModifiedFiles
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InitialUploadPolicy

Initial upload policy Parameter

Type:String
Accepted values:Merge, ServerAuthoritative
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LocalCacheMode

Local cache mode Parameter

Type:String
Accepted values:DownloadNewAndModifiedFiles, UpdateLocallyCachedFiles
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the ServerEndpoint.

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

-ParentObject

SyncGroup Object, normally passed through the parameter.

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

-ParentResourceId

SyncGroup Parent Resource Id

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

-ServerLocalPath

Server Local Path Parameter

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

-ServerResourceId

RegisteredServer Resource Id

Type:String
Position:Named
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

-SyncGroupName

Name of the SyncGroup.

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

-TierFilesOlderThanDays

Tier Files Older Than Days Parameter

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VolumeFreeSpacePercent

Volume Free Space Percent Parameter

Type:Nullable<T>[Int32]
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

PSSyncGroup

String

Outputs

PSServerEndpoint