Get-SCSPFVMRoleGalleryItemPackage

Gets the package that created an item in the gallery.

Syntax

Get-SCSPFVMRoleGalleryItemPackage
   [-VMRoleGalleryItem] <VMRoleGalleryItem>
   [<CommonParameters>]
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.

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

-Publisher

Specifies the publisher of the gallery package.

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

-Version

Specifies the version of the gallery item.

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

-VMRoleGalleryItem

Specifies an object for the gallery item.

Type:Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

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

Outputs

System.Object