Share via


Get-SCSPFVMRoleGalleryItemPackage

Gets the package that created an item in the gallery.

Syntax

FromGalleryItemParameterSetName (Default)

Get-SCSPFVMRoleGalleryItemPackage
    [-VMRoleGalleryItem] <VMRoleGalleryItem>
    [<CommonParameters>]

FromGalleryItemNameVersionPublisherParameterSetName

Get-SCSPFVMRoleGalleryItemPackage
    -Name <String>
    -Version <String>
    -Publisher <String>
    [<CommonParameters>]

Description

The Get-SCSPFVMRoleGalleryItemPackage cmdlet gets an object of type System.IO.MemoryStream that contains the resource package for the gallery item of the virtual machine role.

Examples

Example 1: Get the package by name, publisher, and version

PS C:\>$GalleryPackage = Get-SCSPFVMRoleGalleryItemPackage -Name "570569955cbfb62b374358b34467020750f65c" -Publisher Microsoft -Version 1.0.0.0

This command gets the package for the gallery item by specifying the name, publisher, and version.

PS C:\>$GalleryItem = Get-SCSPFVMRoleGalleryItem -Name "570569955cbfb62b374358b34467020750f65c"
PS C:\> $GalleryPackage = Get-SCSPFVMRoleGalleryItemPackage -VMRoleGalleryItem $GalleryItem

The first command gets a gallery item by its name and stores the gallery item in the $GalleryItem variable. The next command gets the package by using the VMRoleGalleryItem parameter.

Parameters

-Name

Specifies the name of the package that installs the gallery item.

Parameter properties

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

Parameter sets

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

-Publisher

Specifies the publisher of the gallery package.

Parameter properties

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

Parameter sets

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

-Version

Specifies the version of the gallery item.

Parameter properties

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

Parameter sets

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

-VMRoleGalleryItem

Specifies an object for the gallery item.

Parameter properties

Type:Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromGalleryItemParameterSetName
Position:0
Mandatory:True
Value from pipeline:True
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

Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem

Outputs

System.Object