Edit

Update-AzGallery

Update a gallery.

Syntax

DefaultParameter (Default)

Update-AzGallery
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-AsJob]
    [-Description <String>]
    [-Tag <Hashtable>]
    [-Permission <String>]
    [-Subscription <String[]>]
    [-Tenant <String[]>]
    [-RemoveSubscription <String[]>]
    [-RemoveTenant <String[]>]
    [-Share]
    [-Community]
    [-Reset]
    [-PublisherUri <String>]
    [-PublisherContact <String>]
    [-Eula <String>]
    [-PublicNamePrefix <String>]
    [-EnableSystemAssignedIdentity]
    [-DisableSystemAssignedIdentity]
    [-UserAssignedIdentity <String[]>]
    [-RemoveUserAssignedIdentity <String[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ResourceIdParameter

Update-AzGallery
    [-ResourceId] <String>
    [-AsJob]
    [-Description <String>]
    [-Tag <Hashtable>]
    [-Permission <String>]
    [-Subscription <String[]>]
    [-Tenant <String[]>]
    [-RemoveSubscription <String[]>]
    [-RemoveTenant <String[]>]
    [-Share]
    [-Community]
    [-Reset]
    [-PublisherUri <String>]
    [-PublisherContact <String>]
    [-Eula <String>]
    [-PublicNamePrefix <String>]
    [-EnableSystemAssignedIdentity]
    [-DisableSystemAssignedIdentity]
    [-UserAssignedIdentity <String[]>]
    [-RemoveUserAssignedIdentity <String[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ObjectParameter

Update-AzGallery
    [-InputObject] <PSGallery>
    [-AsJob]
    [-Description <String>]
    [-Tag <Hashtable>]
    [-Permission <String>]
    [-Subscription <String[]>]
    [-Tenant <String[]>]
    [-RemoveSubscription <String[]>]
    [-RemoveTenant <String[]>]
    [-Share]
    [-Community]
    [-Reset]
    [-PublisherUri <String>]
    [-PublisherContact <String>]
    [-Eula <String>]
    [-PublicNamePrefix <String>]
    [-EnableSystemAssignedIdentity]
    [-DisableSystemAssignedIdentity]
    [-UserAssignedIdentity <String[]>]
    [-RemoveUserAssignedIdentity <String[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Update a gallery.

Examples

Example 1

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Description $galleryDescription

Update a gallery.

Example 2

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Permission Groups -Share -Tenant xxxxxxxx-xxx-xxxxxxx,zzzzzz-zzzzzzz-zzzzzz

Update a gallery to be shared and add two subscriptions it is to be shared with.

Example 3

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -EnableSystemAssignedIdentity

Update a gallery to enable a system-assigned managed identity.

Example 4

$uid = Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName
Get-AzGallery -ResourceGroupName $rgname -Name $galleryName | Update-AzGallery -UserAssignedIdentity $uid.Id

Update a gallery to add a user-assigned managed identity using pipeline input.

Example 5

$uid1 = (Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName1).Id
$uid2 = (Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName2).Id
Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -UserAssignedIdentity @($uid1, $uid2)

Update a gallery to add the two specified user-assigned managed identities. These are appended to any previously assigned identities.

Example 6

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -DisableSystemAssignedIdentity

Update a gallery to disable its system-assigned managed identity.

Example 7

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -RemoveUserAssignedIdentity "All"

Update a gallery to remove all user-assigned managed identities.

Example 8

$uid = (Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName).Id
Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -RemoveUserAssignedIdentity @($uid)

Update a gallery to remove a specific 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

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

-Community

Update sharing profile of the gallery to community.

Parameter properties

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

Parameter sets

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

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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

-Description

The description of the gallery resource.

Parameter properties

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

Parameter sets

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

-DisableSystemAssignedIdentity

Disables system-assigned managed identity on the gallery. Cannot be used together with -EnableSystemAssignedIdentity.

Parameter properties

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

Parameter sets

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

-EnableSystemAssignedIdentity

Enables system-assigned managed identity on the gallery. Cannot be used together with -DisableSystemAssignedIdentity.

Parameter properties

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

Parameter sets

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

-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

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

-InputObject

The PS Gallery Object.

Parameter properties

Type:PSGallery
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Gallery

Parameter sets

ObjectParameter
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the gallery.

Parameter properties

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

Parameter sets

DefaultParameter
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Permission

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

Parameter properties

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

Parameter sets

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

-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

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

-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

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

-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

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

-RemoveSubscription

A list of subscription IDs the gallery will stop sharing to.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-RemoveTenant

A list of tenant IDs the gallery will stop sharing to.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-RemoveUserAssignedIdentity

The list of user-assigned managed identity resource IDs to remove from the gallery. Alternatively, specify 'All' to remove all user-assigned identities. If 'All' is provided, it must be the only value in -RemoveUserAssignedIdentity, and any use of 'All' causes all user-assigned identities to be removed. Cannot use 'All' together with -UserAssignedIdentity.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-Reset

Resets the sharing permission of the gallery to 'Private'.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

The name of the resource group.

Parameter properties

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

Parameter sets

DefaultParameter
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceId

The resource Id for the gallery

Parameter properties

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

Parameter sets

ResourceIdParameter
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Share

Update sharing profile of the gallery.

Parameter properties

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

Parameter sets

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

-Subscription

A list of subscription IDs the gallery is aimed to be shared to.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-Tag

Resource tags

Parameter properties

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

Parameter sets

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

-Tenant

A list of tenant IDs the gallery is aimed to be shared to.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-UserAssignedIdentity

The list of user-assigned managed identity resource IDs to add to the gallery. Identities are appended to any existing user-assigned identities. Cannot use together with '-RemoveUserAssignedIdentity All'. 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

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

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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

PSGallery

Hashtable

String

Outputs

PSGallery