Bearbeiten

Freigeben über


Set-AzStorageSyncService

This command sets storage sync service in a resource group.

Syntax

Set-AzStorageSyncService
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-IncomingTrafficPolicy] <String>]
   [-AssignIdentity]
   [-UserAssignedIdentityId <String>]
   [-IdentityType <String>]
   [-UseIdentity <Boolean>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzStorageSyncService
   [-InputObject] <PSStorageSyncService>
   [-AssignIdentity]
   [-UserAssignedIdentityId <String>]
   [-IdentityType <String>]
   [-UseIdentity <Boolean>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzStorageSyncService
   [-ResourceId] <String>
   [-AssignIdentity]
   [-UserAssignedIdentityId <String>]
   [-IdentityType <String>]
   [-UseIdentity <Boolean>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

A storage sync service is the top level resource for Azure File Sync. This command sets storage sync service in a resource group. We recommend to create as few storage sync services as absolutely necessary to differentiate distinct groups of servers in your organization. A storage sync service contains sync groups and also works as a target to register your servers to. A server can only be registered to a single storage sync service. If servers ever need to participate in syncing the same set of files, register them to the same storage sync service.

Examples

Example 1

Set-AzStorageSyncService -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName" -IncomingTrafficPolicy "AllowAllTraffic"

This command will set a storage sync service.

Parameters

-AsJob

Run cmdlet in the background.

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

-AssignIdentity

Generate and assign a new Storage Sync Service Identity for this storage sync service for use with accessing storage account and file share. If specify this paramter without "-IdentityType", will use system assigned identity.

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

-IdentityType

Set the new Storage Sync Service Identity type, the identity is for use with accessing storage account and file share.

Type:String
Accepted values:SystemAssigned, UserAssigned, SystemAssignedUserAssigned, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IncomingTrafficPolicy

Storage Sync Service IncomingTrafficPolicy

Type:String
Accepted values:AllowVirtualNetworksOnly, AllowAllTraffic
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-InputObject

StorageSyncService Input Object, normally passed through the pipeline.

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

-Name

Name of the storage sync service.

Type:String
Aliases:StorageSyncServiceName
Position:1
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:True
Accept wildcard characters:False

-ResourceId

StorageSyncService Resource Id.

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

-Tag

Storage Sync Service Tags.

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UseIdentity

Set the topology to trigger consumption if manged identity feature on both cloud and server.

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

-UserAssignedIdentityId

Set resource ids for the the new Storage Sync Service user assigned Identity, the identity will be used with accessing storage account and file share.

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

String

Outputs

PSStorageSyncService