Set-AzBatchComputeNodeUser

修改 Batch 計算節點上帳戶的屬性。

Syntax

Set-AzBatchComputeNodeUser
   [-PoolId] <String>
   [-ComputeNodeId] <String>
   [-Name] <String>
   [-Password] <SecureString>
   [-ExpiryTime <DateTime>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Set-AzBatchComputeNodeUser Cmdlet 會修改 Azure Batch 計算節點上用戶帳戶的屬性。

範例

範例 1:更新用戶帳戶

Set-AzBatchComputeNodeUser -PoolId "ContosoPool" -ComputeNodeId "tvm-3257026573_1-20150904t230807z" -Name "PFuller" -BatchContext $Context -Password "Password" -ExpiryTime ([DateTime]::Now.AddDays(14))

此命令會修改計算節點上名為 PFuller 的使用者帳戶,該用戶帳戶在名為 ContosoPool 的集區中具有指定的標識碼。 命令會變更帳戶密碼和到期時間。

參數

-BatchContext

指定 此 Cmdlet 用來與 Batch 服務互動的 BatchAccountContext 實例。 如果您使用 Get-AzBatchAccount Cmdlet 來取得 BatchAccountContext,則與 Batch 服務互動時,將會使用 Microsoft Entra 驗證。 若要改用共用密鑰驗證,請使用 Get-AzBatchAccountKey Cmdlet 來取得已填入其存取密鑰的 BatchAccountContext 物件。 使用共用金鑰驗證時,預設會使用主要存取金鑰。 若要變更要使用的密鑰,請設定 BatchAccountContext.KeyInUse 屬性。

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

-ComputeNodeId

指定此 Cmdlet 運作所在計算節點的識別碼。

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpiryTime

指定用戶帳戶的到期時間。

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

-Name

指定此 Cmdlet 修改的使用者帳戶名稱。

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

-Password

指定使用者帳戶的密碼。

Type:SecureString
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PoolId

指定集區標識碼,其中包含此 Cmdlet 運作所在的計算節點。

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

輸入

BatchAccountContext

輸出

Void