Get-AzBatchNodeFile

Batch 노드 파일의 속성을 가져옵니다.

Syntax

Get-AzBatchNodeFile
   [-PoolId] <String>
   [-ComputeNodeId] <String>
   [[-Path] <String>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchNodeFile
   -JobId <String>
   -TaskId <String>
   [[-Path] <String>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchNodeFile
   -JobId <String>
   -TaskId <String>
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Recursive]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchNodeFile
   [[-Task] <PSCloudTask>]
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Recursive]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchNodeFile
   [-PoolId] <String>
   [-ComputeNodeId] <String>
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Recursive]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzBatchNodeFile
   [[-ComputeNode] <PSComputeNode>]
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Recursive]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzBatchNodeFile cmdlet은 태스크 또는 컴퓨팅 노드의 Azure Batch 노드 파일의 속성을 가져옵니다. 결과의 범위를 좁히려면 OData(Open Data Protocol) 필터를 지정할 수 있습니다. 필터가 아닌 작업을 지정하는 경우 이 cmdlet은 해당 작업의 모든 노드 파일에 대한 속성을 반환합니다. 필터가 아닌 컴퓨팅 노드를 지정하는 경우 이 cmdlet은 해당 컴퓨팅 노드의 모든 노드 파일에 대한 속성을 반환합니다.

예제

예제 1: 작업과 연결된 노드 파일의 속성 가져오기

Get-AzBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "Stdout.txt" -BatchContext $Context

IsDirectory Name          Properties                                      Url

----------- ----          ----------                                      ---

False       StdOut.txt    Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...

이 명령은 ID Job-0000001이 있는 작업에 ID Task26이 있는 태스크와 연결된 StdOut.txt 노드 파일의 속성을 가져옵니다. Get-AzBatchAccountKey cmdlet을 사용하여 $Context 변수에 컨텍스트를 할당합니다.

예제 2: 필터를 사용하여 작업과 연결된 노드 파일의 속성을 가져옵니다.

Get-AzBatchNodeFile -JobId "Job-00002" -TaskId "Task26" -Filter "startswith(name,'St')" -BatchContext $Context

IsDirectory Name        Properties                                      Url

----------- ----        ----------                                      ---

False       StdErr.txt  Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
False       StdOut.txt  Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...

이 명령은 이름이 st로 시작되고 ID Job-00002가 있는 작업에서 ID Task26이 있는 작업과 연결된 노드 파일의 속성을 가져옵니다.

예제 3: 태스크와 연결된 노드 파일의 속성을 재귀적으로 가져옵니다.

Get-AzBatchTask "Job-00003" "Task31" -BatchContext $Context | Get-AzBatchNodeFile -Recursive -BatchContext $Context

IsDirectory Name             Properties                                      Url

----------- ----             ----------                                      ---

False       ProcessEnv.cmd   Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
False       StdErr.txt       Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
False       StdOut.txt       Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
True        wd                                                               https://cmdletexample.westus.Batch.contoso...
False       wd\newFile.txt   Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...

이 명령은 작업 작업-00003에서 ID Task31이 있는 태스크와 연결된 모든 파일의 속성을 가져옵니다. 이 명령은 재귀 매개 변수를 지정 합니다 . 따라서 cmdlet은 재귀 파일 검색을 수행하고 wd\newFile.txt 노드 파일을 반환합니다.

예제 4: 컴퓨팅 노드에서 단일 파일 가져오기

Get-AzBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Path "Startup\StdOut.txt" -BatchContext $Context

IsDirectory Name                    Properties                                      Url
----------- ----                    ----------                                      ---
False       startup\stdout.txt      Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...

이 명령은 ID Pool22가 있는 풀에 ID ComputeNode01이 있는 컴퓨팅 노드에서 Startup\StdOut.txt이라는 파일을 가져옵니다.

예제 5: 컴퓨팅 노드에서 폴더 아래의 모든 파일 가져오기

Get-AzBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Filter "startswith(name,'startup')" -Recursive -BatchContext $Context

IsDirectory Name                      Properties                                      Url
----------- ----                      ----------                                      ---
True        startup                                                                   https://cmdletexample.westus.Batch.contoso...
False       startup\ProcessEnv.cmd    Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
False       startup\stderr.txt        Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
False       startup\stdout.txt        Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso...
True        startup\wd                                                                https://cmdletexample.westus.Batch.contoso...

이 명령은 ID Pool22가 있는 풀에 ID ComputeNode01이 있는 컴퓨팅 노드에서 시작 폴더 아래의 모든 파일을 가져옵니다. 이 cmdlet은 재귀 매개 변수를 지정합니다 .

예제 6: 컴퓨팅 노드의 루트 폴더에서 파일 가져오기

Get-AzBatchComputeNode "Pool22" -Id "ComputeNode01" -BatchContext $Context | Get-AzBatchNodeFile -BatchContext $Context

IsDirectory Name           Properties       Url
----------- ----           ----------       ---
True        shared                          https://cmdletexample.westus.Batch.contoso...
True        startup                         https://cmdletexample.westus.Batch.contoso...
True        workitems                       https://cmdletexample.westus.Batch.contoso...

이 명령은 ID Pool22가 있는 풀에 ID ComputeNode01이 있는 컴퓨팅 노드의 루트 폴더에 있는 모든 파일을 가져옵니다.

매개 변수

-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

-ComputeNode

Batch 노드 파일을 포함하는 컴퓨팅 노드를 PSComputeNode 개체로 지정합니다. 컴퓨팅 노드 개체를 가져오려면 Get-AzBatchComputeNode cmdlet을 사용합니다.

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

-ComputeNodeId

Batch 노드 파일이 포함된 컴퓨팅 노드의 ID를 지정합니다.

Type:String
Position:1
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은 이 매개 변수가 지정하는 필터와 일치하는 노드 파일의 속성을 반환합니다.

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

-JobId

대상 작업이 포함된 작업의 ID를 지정합니다.

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

-MaxCount

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

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

-Path

이 cmdlet이 속성을 검색하는 노드 파일의 경로를 지정합니다. 와일드 카드 문자를 지정할 수 없습니다.

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

-PoolId

노드 파일의 속성을 가져올 컴퓨팅 노드를 포함하는 풀의 ID를 지정합니다.

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

-Recursive

이 cmdlet이 재귀 파일 목록을 반환한다는 것을 나타냅니다. 그렇지 않으면 루트 폴더의 파일만 반환합니다.

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

-Task

노드 파일이 연결된 작업을 PSCloudTask 개체로 지정합니다. 작업 개체를 가져오려면 Get-AzBatchTask cmdlet을 사용합니다.

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

-TaskId

이 cmdlet이 노드 파일의 속성을 가져오는 작업의 ID를 지정합니다.

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

입력

String

PSCloudTask

PSComputeNode

BatchAccountContext

출력

PSNodeFile