共用方式為


Set-AzStorageSyncServer

此命令會設定具有身分識別的伺服器。 這有助於使用身分識別功能來啟用伺服器。

語法

Set-AzStorageSyncServer
   [-ResourceGroupName] <String>
   [-StorageSyncServiceName] <String>
   [-Identity]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzStorageSyncServer
   [-ParentObject] <PSStorageSyncService>
    [-Identity]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzStorageSyncServer
   [-ParentResourceId] <String>
    [-Identity]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

此命令會將伺服器註冊到記憶體同步服務,這是 Azure 檔案同步的最上層資源。系統會建立伺服器與記憶體同步服務之間的信任關係,以確保安全的數據傳輸和管理通道。 接著,PowerShell 或 Azure 入口網站可用來設定此伺服器上的同步處理。 伺服器只能註冊到單一記憶體同步服務。 如果伺服器必須參與同步處理同一組檔案,請將它們註冊到相同的記憶體同步服務。 命令必須在要註冊的伺服器上本機執行 -- 直接執行或透過遠端 PowerShell 工作階段執行。 無法接受遠端計算機物件。

範例

範例 1

Set-AzStorageSyncServer -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName" -Identity

此命令會設定具有身分識別的伺服器。 這有助於使用身分識別功能來啟用伺服器。

參數

-AsJob

在背景執行 Cmdlet

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

-CloudTiering

Identity 參數

類型: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

-ParentObject

StorageSyncService 物件,通常透過 參數傳遞。

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

-ParentResourceId

StorageSyncService 父資源標識符

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

-ResourceGroupName

資源組名。

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

-StorageSyncServiceName

StorageSyncService 的名稱。

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

-WhatIf

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

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

輸入

String

PSStorageSyncService

輸出

PSRegisteredServer