Get-SCSpfVMRoleGalleryItemPackage

Gets the package that created an item in the gallery.

Syntax

Get-SCSpfVMRoleGalleryItemPackage -Name <String> -Publisher <String> -Version <String> [<CommonParameters>]
Get-SCSpfVMRoleGalleryItemPackage [-VMRoleGalleryItem] <VMRoleGalleryItem> [<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.

Example 2: Get the package from a gallery item

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:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Publisher

Specifies the publisher of the gallery package.

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

Specifies an object for the gallery item.

Type:VMRoleGalleryItem
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Version

Specifies the version of the gallery item.

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