你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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>]
说明
获取或列出库。
示例
示例 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
库的资源 ID
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Scope
指定共享到订阅或租户的库。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |