Bearbeiten

Freigeben über


Start-AzSqlElasticJob

Starts a job, returning a job execution id that can be polled to view it's status

Syntax

Start-AzSqlElasticJob
     [-ResourceGroupName] <String>
     [-ServerName] <String>
     [-AgentName] <String>
     [-JobName] <String>
     [-Wait]
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzSqlElasticJob
     [-ParentObject] <AzureSqlElasticJobModel>
     [-Wait]
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzSqlElasticJob
     [-ParentResourceId] <String>
     [-Wait]
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Start-AzSqlElasticJob cmdlet starts a job returning a new job execution

Examples

Example 1 - Starts a job returning a new job execution

$job = Get-AzSqlElasticJob -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -Name job1
$job | Start-AzSqlElasticJob

JobName JobExecutionId                       Lifecycle StartTime EndTime
------- --------------                       --------- --------- -------
job1    b93b3a90-987b-4565-b3d3-5fa1751fa9bc Created

Starts a job returning a new job execution

Parameters

-AgentName

The agent name

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

-AsJob

Run cmdlet in the background

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

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

-JobName

The job name

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

-ParentObject

The job object

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

-ParentResourceId

The job resource id

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

-ResourceGroupName

The resource group name

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

-ServerName

The server name

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

-Wait

The wait flag to indicate to wait until the job's execution is done

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

AzureSqlElasticJobModel

Outputs

AzureSqlElasticJobExecutionModel