共用方式為


Set-AzStorageSyncService

此命令會在資源群組中設定記憶體同步服務。

語法

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

記憶體同步服務是 Azure 檔案同步的最上層資源。此命令會在資源群組中設定記憶體同步服務。 建議您盡可能建立最少的記憶體同步服務,以區分組織中的不同伺服器群組。 記憶體同步服務包含同步群組,也可以作為註冊伺服器的目標。 伺服器只能註冊到單一記憶體同步服務。 如果伺服器必須參與同步處理同一組檔案,請將它們註冊到相同的記憶體同步服務。

範例

範例 1

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

此命令會設定記憶體同步服務。

參數

-AsJob

在背景中執行 Cmdlet。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AssignIdentity

產生並指派此記憶體同步服務的新記憶體同步服務識別,以用於存取記憶體帳戶和檔案共用。 如果指定沒有 「-IdentityType」 的這個參數,將會使用系統指派的身分識別。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IdentityType

設定新的記憶體同步服務識別類型,身分識別可用於存取記憶體帳戶和檔案共用。

類型:String
接受的值:SystemAssigned, UserAssigned, SystemAssignedUserAssigned, None
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IncomingTrafficPolicy

記憶體同步服務傳入TrafficPolicy

類型:String
接受的值:AllowVirtualNetworksOnly, AllowAllTraffic
Position:2
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-InputObject

StorageSyncService Input 物件,通常會通過管線。

類型:PSStorageSyncService
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

記憶體同步服務的名稱。

類型:String
別名:StorageSyncServiceName
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

資源組名。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceId

StorageSyncService 資源標識符。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Tag

記憶體同步服務標籤。

類型:Hashtable
別名:Tags
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UseIdentity

如果雲端和伺服器上的受控身分識別功能受管理,請設定拓撲以觸發取用。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UserAssignedIdentityId

為新的記憶體同步服務使用者指派的身分識別設定資源識別碼,身分識別將會用於存取記憶體帳戶和檔案共用。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

輸出

PSStorageSyncService