Get-SCSPFVMRoleGalleryItemIcon
取得與資源庫專案相關聯的圖示。
Syntax
Get-SCSPFVMRoleGalleryItemIcon
[-VMRoleGalleryItem] <VMRoleGalleryItem>
-IconFileName <String>
[<CommonParameters>]
Get-SCSPFVMRoleGalleryItemIcon
-Name <String>
-Version <String>
-Publisher <String>
-IconFileName <String>
[<CommonParameters>]
Description
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中。
第二個命令會使用 變數指定必要的參數,以取得圖示物件。 明確指定 IconFileName 參數,以防變數具有圖示檔案名的 Null 值。
參數
-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