다음을 통해 공유


Get-AzBatchComputeNode

풀에서 Batch 컴퓨팅 노드를 가져옵니다.

Syntax

Get-AzBatchComputeNode
   [-PoolId] <String>
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Select <String>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchComputeNode
   [-PoolId] <String>
   [[-Id] <String>]
   [-Select <String>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchComputeNode
   [[-Pool] <PSCloudPool>]
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Select <String>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzBatchComputeNode cmdlet은 풀에서 Azure Batch 컴퓨팅 노드를 가져옵니다. PoolID 또는 Pool 매개 변수를 지정합니다. Id 매개 변수를 지정하여 단일 컴퓨팅 노드를 가져옵니다. OData(Open Data Protocol) 필터와 일치하는 컴퓨팅 노드를 가져올 필터 매개 변수를 지정합니다.

예제

예제 1: ID로 컴퓨팅 노드 가져오기

Get-AzBatchComputeNode -PoolId "Pool06" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context

Id                    : tvm-2316545714_1-20150725t213220z
Url                   : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z
State                 : Idle
StateTransitionTime   : 7/25/2015 9:36:53 PM
LastBootTime          : 7/25/2015 9:36:53 PM
AllocationTime        : 7/25/2015 9:32:20 PM
IPAddress             : 10.14.121.1
AffinityId            : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize    : standard_d1_v2
TotalTasksRun         : 1
StartTaskInformation  :
RecentTasks           : {}
StartTask             :
CertificateReferences :
Errors                :

이 명령은 ID Pool06이 있는 풀에서 ID tvm-2316545714_1-20150725t213220z가 있는 컴퓨팅 노드를 가져옵니다. Get-AzBatchAccountKey cmdlet을 사용하여 $Context 변수에 컨텍스트를 할당합니다.

예제 2: 풀에서 모든 유휴 컴퓨팅 노드 가져오기

Get-AzBatchComputeNode -PoolId "Pool06" -Filter "state eq 'idle'" -BatchContext $Context

Id                    : tvm-2316545714_1-20150725t213220z
Url                   : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z
State                 : Idle
StateTransitionTime   : 7/25/2015 9:36:53 PM
LastBootTime          : 7/25/2015 9:36:53 PM
AllocationTime        : 7/25/2015 9:32:20 PM
IPAddress             : 10.14.121.1
AffinityId            : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize    : standard_d1_v2
TotalTasksRun         : 1
StartTaskInformation  :
RecentTasks           : {}
StartTask             :
CertificateReferences :
Errors                :

Id                    : tvm-2316545714_2-20150726t172920z
Url                   : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z
State                 : Idle
StateTransitionTime   : 7/26/2015 5:33:58 PM
LastBootTime          : 7/26/2015 5:33:58 PM
AllocationTime        : 7/26/2015 5:29:20 PM
IPAddress             : 10.14.121.38
AffinityId            : TVM:tvm-2316545714_2-20150726t172920z
VirtualMachineSize    : standard_d1_v2
TotalTasksRun         : 0
StartTaskInformation  :
RecentTasks           :
StartTask             :
CertificateReferences :
Errors                :

이 명령은 ID Pool06이 있는 풀에 포함된 모든 유휴 컴퓨팅 노드를 가져옵니다. 이 명령은 Filter 매개 변수를 사용하여 유휴 상태를 지정합니다.

예제 3: 지정된 풀의 모든 컴퓨팅 노드 가져오기

Get-AzBatchPool -Id "Pool07" -BatchContext $Context | Get-AzBatchComputeNode -BatchContext $Context

Id                    : tvm-2316545714_1-20150725t213220z
Url                   : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z
State                 : Idle
StateTransitionTime   : 7/25/2015 9:36:53 PM
LastBootTime          : 7/25/2015 9:36:53 PM
AllocationTime        : 7/25/2015 9:32:20 PM
IPAddress             : 10.14.121.1
AffinityId            : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize    : standard_d1_v2
TotalTasksRun         : 1
StartTaskInformation  :
RecentTasks           : {}
StartTask             :
CertificateReferences :
Errors                :


Id                    : tvm-2316545714_2-20150726t172920z
Url                   : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z
State                 : Idle
StateTransitionTime   : 7/26/2015 5:33:58 PM
LastBootTime          : 7/26/2015 5:33:58 PM
AllocationTime        : 7/26/2015 5:29:20 PM

IPAddress             : 10.14.121.38
AffinityId            : TVM:tvm-2316545714_2-20150726t172920z
VirtualMachineSize    : standard_d1_v2
TotalTasksRun         : 0
StartTaskInformation  :
RecentTasks           :
StartTask             :
CertificateReferences :
Errors                :

이 명령은 Get-AzBatchPool cmdlet을 사용하여 ID Pool07이 있는 풀을 가져옵니다. 이 명령은 파이프라인 연산자를 사용하여 현재 cmdlet에 해당 풀을 전달합니다. 해당 cmdlet은 해당 풀에서 모든 컴퓨팅 노드를 가져옵니다.

매개 변수

-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

-DefaultProfile

Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독입니다.

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

-Filter

OData 필터 절을 지정합니다. 이 cmdlet은 이 매개 변수가 지정하는 필터와 일치하는 컴퓨팅 노드를 반환합니다. 필터를 지정하지 않으면 이 cmdlet은 풀에 대한 모든 컴퓨팅 노드를 반환합니다.

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

-Id

이 cmdlet이 풀에서 가져오는 컴퓨팅 노드의 ID를 지정합니다. 와일드 카드 문자를 지정할 수 없습니다.

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

-MaxCount

반환할 컴퓨팅 노드의 최대 수를 지정합니다. 0 이하의 값을 지정하는 경우 cmdlet은 상한을 사용하지 않습니다. 기본값은 1000입니다.

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

-Pool

컴퓨팅 노드를 포함하는 풀을 PSCloudPool 개체로 지정합니다. PSCloudPool 개체를 가져오려면 Get-AzBatchPool cmdlet을 사용합니다.

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

-PoolId

컴퓨팅 노드를 포함하는 풀의 ID를 지정합니다.

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

-Select

OData select 절을 지정합니다. 이 매개 변수의 값을 지정하여 모든 개체 속성이 아닌 특정 속성을 가져옵니다.

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

입력

String

PSCloudPool

BatchAccountContext

출력

PSComputeNode