Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzGallery

Create a gallery.

Syntax

Default (Default)

New-AzGallery
 [-ResourceGroupName] <String>
 [-Name] <String>
 [-AsJob]
 [-Location] <String>
 [-Description <String>]
 [-Tag <Hashtable>]
 [-Permission <String>]
 [-PublisherUri <String>]
 [-PublisherContact <String>]
 [-Eula <String>]
 [-PublicNamePrefix <String>]
 [-EnableSystemAssignedIdentity]
 [-UserAssignedIdentity <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

Create a gallery.

Examples

Example 1

New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -Description $galleryDescription

Create a gallery.

Example 2

New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -Description $galleryDescription -Permission Groups

Create a gallery with Direct Sharing enabled.

Example 3

New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -EnableSystemAssignedIdentity

Create a gallery with a system-assigned managed identity.

Example 4

$uid = Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -UserAssignedIdentity $uid.Id

Create a gallery with a user-assigned managed identity.

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

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

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

-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

-Description

The description of the gallery resource.

Parameter properties

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

Parameter sets

-EnableSystemAssignedIdentity

Enables system-assigned managed identity on the gallery.

Parameter properties

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

Parameter sets

-Eula

Gets or sets end-user license agreement for community gallery image.

Parameter properties

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

Parameter sets

-Location

Resource location

Parameter properties

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

Parameter sets

-Name

The name of the gallery.

Parameter properties

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

Parameter sets

-Permission

This property allows you to specify the permission of sharing gallery. Possible values are: 'Private' and 'Groups'.

Parameter properties

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

Parameter sets

-PublicNamePrefix

Gets or sets the prefix of the gallery name that will be displayed publicly. Visible to all users.

Parameter properties

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

Parameter sets

-PublisherContact

Gets or sets community gallery publisher support email. The email address of the publisher. Visible to all users.

Parameter properties

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

Parameter sets

-PublisherUri

Gets or sets the link to the publisher website. Visible to all users.

Parameter properties

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

Parameter sets

-ResourceGroupName

The name of the resource group.

Parameter properties

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

Parameter sets

-Tag

Resource tags

Parameter properties

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

Parameter sets

-UserAssignedIdentity

The list of user-assigned managed identity resource IDs to associate with the gallery. The resource IDs are in the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

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

Parameter properties

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

Parameter sets

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

Hashtable

String

Outputs

PSGallery


Feedback

Was this page helpful?