Redigera

Dela via


New-AzBatchApplicationPackage

Creates an application package in a Batch account.

Syntax

New-AzBatchApplicationPackage
   [-AccountName] <String>
   [-ResourceGroupName] <String>
   [-ApplicationName] <String>
   [-ApplicationVersion] <String>
   [-Format] <String>
   -FilePath <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
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.

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

-ActivateOnly

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

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

-ApplicationName

Specifies the name of the application.

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

-ApplicationVersion

Specifies the version of the application.

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:True
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

-FilePath

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

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

-Format

Specifies the format of the application package binary file.

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

-ResourceGroupName

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

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

Inputs

String

SwitchParameter

Outputs

PSApplicationPackage