共用方式為


Get-AzGallery

取得或列出畫廊。

語法

DefaultParameter (預設值)

Get-AzGallery
    [[-ResourceGroupName] <String>]
    [[-Name] <String>]
    [-Expand <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ResourceIdParameter

Get-AzGallery
    [-ResourceId] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SharedGalleryParameterSet

Get-AzGallery
    -Location <String>
    [-GalleryUniqueName <String>]
    [-Scope <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

CommunityGalleryParameterSet

Get-AzGallery
    [-GalleryPublicName <String>]
    [-Location <String>]
    [-Community]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

取得或列出畫廊。

範例

範例 1

Get-AzGallery -ResourceGroupName rg1 -GalleryName gallery1
ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery1
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery1
Name              : gallery1
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

取得圖庫「gallery1」

範例 2

Get-AzGallery -ResourceGroupName rg1
ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery1
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery1
Name              : gallery1
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery2
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery2
Name              : gallery2
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

獲取 rg1 中的所有畫廊。

範例 3

Get-AzGallery
ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery1
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery1
Name              : gallery1
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery2
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery2
Name              : gallery2
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

ResourceGroupName : rg2
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery3
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/galleries/gallery3
Name              : gallery3
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

訂閱所有畫廊。

範例 4

Get-AzGallery -Name gallery*
ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery1
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery1
Name              : gallery1
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

ResourceGroupName : rg1
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery2
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/galleries/gallery2
Name              : gallery2
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

ResourceGroupName : rg2
Description       : Gallery created by PowerShell.
Identifier        :
  UniqueName      : 00000000-0000-0000-0000-000000000000-gallery3
ProvisioningState : Succeeded
Id                : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Compute/galleries/gallery3
Name              : gallery3
Type              : Microsoft.Compute/galleries
Location          : southcentralus
Tags              : {}

獲取訂閱中以“畫廊”開頭的所有畫廊。

範例 5

Get-AzGallery -Name galleryName -ResourceGroupName rg -Expand SharingProfile/Groups

取得圖庫的分享設定檔。

參數

-Community

列出社區畫廊。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

CommunityGalleryParameterSet
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Expand

要套用至作業的展開查詢選項。 可能的值:「SharingProfile/Groups」

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

DefaultParameter
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-GalleryPublicName

共用影像庫的公用名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

CommunityGalleryParameterSet
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-GalleryUniqueName

共用影像庫的唯一名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

SharedGalleryParameterSet
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Location

共用影像庫的位置。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

SharedGalleryParameterSet
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Name

圖庫的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:True
不要顯示:False
別名:畫廊名稱

參數集

DefaultParameter
Position:1
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ResourceGroupName

資源群組的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:True
不要顯示:False

參數集

DefaultParameter
Position:0
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ResourceId

資源庫的資源識別碼

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ResourceIdParameter
Position:0
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Scope

指定共用給訂用帳戶或租用戶的圖庫。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

SharedGalleryParameterSet
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

String

輸出

PSGallery