你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Az.StorageSync

使用 存储 同步模块中的 cmdlet 可以管理与 PowerShell 中的Azure 文件同步相关的操作。

StorageSync

Get-AzStorageSyncCloudEndpoint

This command lists all cloud endpoints within a given sync group.

Get-AzStorageSyncGroup

This command lists all sync groups within a given storage sync service.

Get-AzStorageSyncServer

This command lists all servers registered to a given storage sync service.

Get-AzStorageSyncServerEndpoint

This command lists all server endpoints within a given sync group.

Get-AzStorageSyncService

This command lists all storage sync services within a given scope of subscription/resource group.

Invoke-AzStorageSyncChangeDetection

This command can be used to manually initiate the detection of namespace changes. It can be targeted to the entire share, subfolder or set of files. When running the command with the -DirectoryPath or -Path parameters, a maximum of 10,000 items can be detected. If the scope of changes is known to you, limit the execution of this command to parts of the namespace, so change detection can finish quickly and within the 10,000 item limit. Alternatively, you can avoid the item limit by running the cmdlet without these parameters, invoking share-level change detection.

Note

If run with -DirectoryPath or -Path parameters, the command will not detect the following changes in the Azure file share:

  • Files that are deleted.
  • Files that are moved out of the share.
  • Files that are deleted and created with the same name.

If share-level change detection is invoked, all of these changes will be detected. These changes will also be detected when the scheduled change detection job runs.

Invoke-AzStorageSyncCompatibilityCheck

Checks for potential compatibility issues between your system and Azure File Sync.

New-AzStorageSyncCloudEndpoint

This command creates an Azure File Sync cloud endpoint in a sync group.

New-AzStorageSyncGroup

This command creates a new sync group within a specified storage sync service.

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.

New-AzStorageSyncService

This command creates a new storage sync service in a resource group.

Register-AzStorageSyncServer

This command registers a server to a storage sync service which creates a trust relationship. PowerShell or the Azure portal can then be used to configure sync on this server.

Remove-AzStorageSyncCloudEndpoint

This command will delete the specified cloud endpoint from a sync group. Without at least one cloud endpoint, no other server endpoints in this sync group can sync.

Remove-AzStorageSyncGroup

This command will delete the specified sync group.

Remove-AzStorageSyncServerEndpoint

This command will delete the specified server endpoint. Sync to this location will stop immediately.

Remove-AzStorageSyncService

This command will delete the specified storage sync service.

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.

Set-AzStorageSyncServerEndpoint

This command allows for changes on the adjustable parameters of a server endpoint.

Set-AzStorageSyncService

This command sets storage sync service in a resource group.

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.