Get-SCSPFVMRoleGalleryItemIcon
获取与库项关联的图标。
语法
Get-SCSPFVMRoleGalleryItemIcon
[-VMRoleGalleryItem] <VMRoleGalleryItem>
-IconFileName <String>
[<CommonParameters>]
Get-SCSPFVMRoleGalleryItemIcon
-Name <String>
-Version <String>
-Publisher <String>
-IconFileName <String>
[<CommonParameters>]
说明
Get-SCSPFVMRoleGalleryItemIcon cmdlet 获取与虚拟机角色使用的库项关联的图标的 System.IO.MemoryStream 对象。
示例
示例 1:获取与库项关联的图标
PS C:\>$GalleryItem = Get-SCSPFVMRoleGalleryItem -Name 570569955cbfb62b374358b34467020750f65c
PS C:\> $GalleryItemIcon = Get-SCSPFVMRoleGalleryItemIcon -Name $GalleryItem.Name -Publisher $GalleryItem.Publisher -Version $GalleryItem.Version -IconFilename "Contoso.ico"
第一个命令获取库项并将其存储在$GalleryItem中。
第二个命令通过使用变量指定所需的参数来获取图标对象。 如果变量具有图标文件名的 null 值,请显式指定 IconFileName 参数。
参数
-IconFileName
指定图标的文件名。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定项的名称。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Publisher
指定项的发布者。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Version
指定项的版本。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMRoleGalleryItem
指定与图标关联的库项。
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输入
Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem
输出
System.Object