你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzGalleryImageDefinition

获取或列出库映像定义。

语法

DefaultParameter (默认值)

Get-AzGalleryImageDefinition
    [-ResourceGroupName] <String>
    [-GalleryName] <String>
    [[-Name] <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SharedGalleryParameterSet

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

CommunityGalleryParameterSet

Get-AzGalleryImageDefinition
    [[-Name] <String>]
    -GalleryPublicName <String>
    -Location <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ResourceIdParameter

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

ListCommunityGalleryParameterSet

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

说明

获取或列出库映像定义。

示例

示例 1

Get-AzGalleryImageDefinition -ResourceGroupName rg1 -GalleryName gallery1 -GalleryImageDefinitionName image1
ResourceGroupName   : rg1
Eula                : eula
PrivacyStatementUri : Https://www.microsoft.com
ReleaseNoteUri      : https://www.microsoft.com
OsType              : Windows
OsState             : Generalized
EndOfLifeDate       : 2/18/2025 12:07:00 PM
Identifier          :
  Publisher         : PsSDKTeamTest
  Offer             : testgalleryoffer1
  Sku               : testgallerysku1
Recommended         :
  VCPUs             :
    Min             : 2
    Max             : 32
  Memory            :
    Min             : 1
    Max             : 100
Disallowed          :
  DiskTypes[0]      : Standard_LRS
PurchasePlan        :
  Name              : PsSDKTestPlan
  Publisher         : PSSDKTeam
  Product           : PsSDKTestProductWindowsVm
ProvisioningState   : Succeeded
Id                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provi
ders/Microsoft.Compute/galleries/gallery1/images/image1
Name                : image1
Type                : Microsoft.Compute/galleries/images
Location            : eastus2
Tags                : {}

获取库映像定义。

示例 2

Get-AzGalleryImageDefinition -ResourceGroupName rg1 -GalleryName gallery1 -GalleryImageDefinitionName image*
ResourceGroupName   : rg1
Eula                : eula
PrivacyStatementUri : Https://www.microsoft.com
ReleaseNoteUri      : https://www.microsoft.com
OsType              : Windows
OsState             : Generalized
EndOfLifeDate       : 2/18/2025 12:07:00 PM
Identifier          :
  Publisher         : PsSDKTeamTest
  Offer             : testgalleryoffer1
  Sku               : testgallerysku1
Recommended         :
  VCPUs             :
    Min             : 2
    Max             : 32
  Memory            :
    Min             : 1
    Max             : 100
Disallowed          :
  DiskTypes[0]      : Standard_LRS
PurchasePlan        :
  Name              : PsSDKTestPlan
  Publisher         : PSSDKTeam
  Product           : PsSDKTestProductWindowsVm
ProvisioningState   : Succeeded
Id                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provi
ders/Microsoft.Compute/galleries/gallery1/images/image1
Name                : image1
Type                : Microsoft.Compute/galleries/images
Location            : eastus2
Tags                : {}

ResourceGroupName   : rg1
Eula                : eula
PrivacyStatementUri : Https://www.microsoft.com
ReleaseNoteUri      : https://www.microsoft.com
OsType              : Windows
OsState             : Generalized
EndOfLifeDate       : 2/18/2025 12:07:00 PM
Identifier          :
  Publisher         : PsSDKTeamTest
  Offer             : testgalleryoffer1
  Sku               : testgallerysku1
Recommended         :
  VCPUs             :
    Min             : 2
    Max             : 32
  Memory            :
    Min             : 1
    Max             : 100
Disallowed          :
  DiskTypes[0]      : Standard_LRS
PurchasePlan        :
  Name              : PsSDKTestPlan
  Publisher         : PSSDKTeam
  Product           : PsSDKTestProductWindowsVm
ProvisioningState   : Succeeded
Id                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provi
ders/Microsoft.Compute/galleries/gallery1/images/image2
Name                : image2
Type                : Microsoft.Compute/galleries/images
Location            : eastus2
Tags                : {}

获取以“image”开头的库映像定义。

示例 3

Get-AzGalleryImageDefinition -ResourceGroupName rg1 -GalleryName gallery1
ResourceGroupName   : rg1
Eula                : eula
PrivacyStatementUri : Https://www.microsoft.com
ReleaseNoteUri      : https://www.microsoft.com
OsType              : Windows
OsState             : Generalized
EndOfLifeDate       : 2/18/2025 12:07:00 PM
Identifier          :
  Publisher         : PsSDKTeamTest
  Offer             : testgalleryoffer1
  Sku               : testgallerysku1
Recommended         :
  VCPUs             :
    Min             : 2
    Max             : 32
  Memory            :
    Min             : 1
    Max             : 100
Disallowed          :
  DiskTypes[0]      : Standard_LRS
PurchasePlan        :
  Name              : PsSDKTestPlan
  Publisher         : PSSDKTeam
  Product           : PsSDKTestProductWindowsVm
ProvisioningState   : Succeeded
Id                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provi
ders/Microsoft.Compute/galleries/gallery1/images/image1
Name                : image1
Type                : Microsoft.Compute/galleries/images
Location            : eastus2
Tags                : {}

ResourceGroupName   : rg1
Eula                : eula
PrivacyStatementUri : Https://www.microsoft.com
ReleaseNoteUri      : https://www.microsoft.com
OsType              : Windows
OsState             : Generalized
EndOfLifeDate       : 2/18/2025 12:07:00 PM
Identifier          :
  Publisher         : PsSDKTeamTest
  Offer             : testgalleryoffer1
  Sku               : testgallerysku1
Recommended         :
  VCPUs             :
    Min             : 2
    Max             : 32
  Memory            :
    Min             : 1
    Max             : 100
Disallowed          :
  DiskTypes[0]      : Standard_LRS
PurchasePlan        :
  Name              : PsSDKTestPlan
  Publisher         : PSSDKTeam
  Product           : PsSDKTestProductWindowsVm
ProvisioningState   : Succeeded
Id                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/provi
ders/Microsoft.Compute/galleries/gallery1/images/image2
Name                : image2
Type                : Microsoft.Compute/galleries/images
Location            : eastus2
Tags                : {}

获取 gallery1 中的库映像定义。

参数

-Community

列出社区库。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ListCommunityGalleryParameterSet
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-GalleryName

库的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

DefaultParameter
Position:1
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-GalleryPublicName

共享映像库的公共名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CommunityGalleryParameterSet
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-GalleryUniqueName

共享映像库的唯一名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

SharedGalleryParameterSet
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-Location

共享映像库的位置。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

SharedGalleryParameterSet
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False
CommunityGalleryParameterSet
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-Name

库映像定义的名称。

参数属性

类型:String
默认值:None
支持通配符:True
不显示:False
别名:GalleryImageDefinitionName

参数集

DefaultParameter
Position:2
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False
SharedGalleryParameterSet
Position:2
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False
CommunityGalleryParameterSet
Position:2
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-ResourceGroupName

资源组的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

DefaultParameter
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-ResourceId

库映像定义的资源 ID

参数属性

类型: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

输出

PSGalleryImage