Get-SCSpfVMRoleGalleryItemIcon

Gets the icon associated with a gallery item.

Syntax

Get-SCSpfVMRoleGalleryItemIcon -IconFileName <String> -Name <String> -Publisher <String> -Version <String>
 [<CommonParameters>]
Get-SCSpfVMRoleGalleryItemIcon [-VMRoleGalleryItem] <VMRoleGalleryItem> -IconFileName <String>
 [<CommonParameters>]

Description

The Get-SCSPFVMRoleGalleryItemIcon cmdlet gets a System.IO.MemoryStream object for the icon that is associated with a gallery item used by a virtual machine role.

Examples

Example 1: Get the icon associated with a gallery item

PS C:\>$GalleryItem = Get-SCSPFVMRoleGalleryItem -Name 570569955cbfb62b374358b34467020750f65c
PS C:\> $GalleryItemIcon = Get-SCSPFVMRoleGalleryItemIcon -Name $GalleryItem.Name -Publisher $GalleryItem.Publisher -Version $GalleryItem.Version -IconFilename "Contoso.ico"

The first command gets a gallery item and stores it in $GalleryItem.

The second command gets the icon object by specifying the required parameters with the variable. Specify the IconFileName parameter explicitly in case the variable has a null value for the icon file name.

Parameters

-IconFileName

Specifies the file name of the icon.

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

Specifies the name of the item.

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

Specifies the publisher of the item.

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

Specifies the gallery item associated with the icon.

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

Specifies the version of the item.

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