Edit

Share via


New-AzBatchApplicationPackage

Creates an application package in a Batch account.

Syntax

UploadAndActivate (Default)

New-AzBatchApplicationPackage
    [-AccountName] <String>
    [-ResourceGroupName] <String>
    [-ApplicationName] <String>
    [-ApplicationVersion] <String>
    [-Format] <String>
    -FilePath <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ActivateOnly

New-AzBatchApplicationPackage
    [-AccountName] <String>
    [-ResourceGroupName] <String>
    [-ApplicationName] <String>
    [-ApplicationVersion] <String>
    [-Format] <String>
    [-ActivateOnly]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzBatchApplicationPackage cmdlet creates an application package in an Azure Batch account.

Examples

Example 1: Install an application package into a Batch account

New-AzBatchApplicationPackage -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -ApplicationName "Litware" -ApplicationVersion "1.0" -FilePath "litware.1.0.zip" -Format "zip"

This command creates and activates version 1.0 of the Litware application, and uploads the contents of litware.1.0.zip as the application package content.

Parameters

-AccountName

Specifies the name of the Batch account to which this cmdlet adds an application package.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ActivateOnly

Indicates that this cmdlet activates an application package that has already been uploaded.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ActivateOnly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ApplicationName

Specifies the name of the application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ApplicationId

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ApplicationVersion

Specifies the version of the application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilePath

Specifies the file to be uploaded as the application package binary file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UploadAndActivate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Format

Specifies the format of the application package binary file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of the resource group that contains the Batch account.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

SwitchParameter

Outputs

PSApplicationPackage