Get-AzBatchJobSchedule
取得 Batch 作業排程。
語法
Get-AzBatchJobSchedule
[-Filter <String>]
[-MaxCount <Int32>]
[-Select <String>]
[-Expand <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchJobSchedule
[[-Id] <String>]
[-Select <String>]
[-Expand <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzBatchJobSchedule Cmdlet 會取得由 BatchContext 參數指定之 Batch 帳戶的 Azure Batch 作業排程。 指定標識碼以取得單一作業排程。 指定 Filter 參數,以取得符合 Open Data Protocol (OData) 篩選條件的工作排程。
範例
範例 1:藉由指定標識符來取得作業排程
Get-AzBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context
CreationTime : 7/25/2015 9:15:43 PM
DisplayName :
ETag : 0x8D2953633427FCA
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule23
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/25/2015 9:15:43 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/25/2015 9:15:43 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule23
此命令會取得標識碼為JobSchedule23的作業排程。 使用 Get-AzBatchAccountKey Cmdlet 將內容指派給$Context變數。
範例 2:使用篩選來取得作業排程
Get-AzBatchJobSchedule -Filter "startswith(id,'Job')" -BatchContext $Context
CreationTime : 7/25/2015 9:15:43 PM
DisplayName :
ETag : 0x8D2953633427FCA
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule23
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/25/2015 9:15:43 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/25/2015 9:15:43 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule23
CreationTime : 7/26/2015 5:39:33 PM
DisplayName :
ETag : 0x8D295E12B1084B4
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule26
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/26/2015 5:39:33 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/26/2015 5:39:33 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule26
此命令會藉由指定 Filter 參數,取得所有以作業開頭的作業排程。
參數
-BatchContext
指定此 Cmdlet 用來與 Batch 服務互動的 BatchAccountContext 實例。 如果您使用 Get-AzBatchAccount Cmdlet 來取得 BatchAccountContext,則與 Batch 服務互動時,將會使用Microsoft Entra 驗證。 若要改用共用密鑰驗證,請使用 Get-AzBatchAccountKey Cmdlet 來取得已填入其存取金鑰的 BatchAccountContext 物件。 使用共用金鑰驗證時,預設會使用主要存取金鑰。 若要變更要使用的密鑰,請設定 BatchAccountContext.KeyInUse 屬性。
類型: | BatchAccountContext |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Expand
指定 Open Data Protocol (OData) expand 子句。 指定此參數的值,以取得您取得之主要實體的相關實體。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Filter
指定 OData 篩選子句。 此 Cmdlet 會傳回符合此參數所指定篩選條件的作業排程。 如果您未指定篩選條件,此 Cmdlet 會傳回 Batch 內容的所有作業排程。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Id
指定此 Cmdlet 取得之作業排程的識別碼。 您無法指定通配符。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-MaxCount
指定要傳回的作業排程數目上限。 如果您指定零 (0) 或更少值,Cmdlet 就不會使用上限。 預設值為 1000。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Select
指定 OData select 子句。 指定此參數的值,以取得特定屬性,而不是所有物件屬性。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |