Get-AzGallery
取得或列出資源庫。
語法
Get-AzGallery
[[-ResourceGroupName] <String>]
[[-Name] <String>]
[-Expand <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzGallery
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzGallery
[-GalleryUniqueName <String>]
[-Scope <String>]
-Location <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
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 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Expand
要套用至作業的展開查詢選項。 可能的值(s):“SharingProfile/Groups”
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-GalleryPublicName
共用映像庫的公用名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-GalleryUniqueName
共用映像庫的唯一名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-Location
共用映像庫的位置。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
資源庫的名稱。
類型: | String |
別名: | GalleryName |
Position: | 1 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | True |
-ResourceGroupName
資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | True |
-ResourceId
資源庫的資源標識碼
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Scope
指定共用至訂用帳戶或租用戶的資源庫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |