Edit

Share via


Get-AzBlueprint

Get one or more blueprint definitions.

Syntax

SubscriptionScope (Default)

Get-AzBlueprint
    [-SubscriptionId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByManagementGroupNameAndVersion

Get-AzBlueprint
    [-Version] <String>
    -Name <String>
    -ManagementGroupId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

BySubscriptionAndName

Get-AzBlueprint
    [-Name <String>]
    [-SubscriptionId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByManagementGroupAndName

Get-AzBlueprint
    -Name <String>
    -ManagementGroupId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByManagementGroupNameAndLatestPublished

Get-AzBlueprint
    -Name <String>
    -ManagementGroupId <String>
    [-LatestPublished]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

BySubscriptionNameAndLatestPublished

Get-AzBlueprint
    -Name <String>
    [-SubscriptionId <String>]
    [-LatestPublished]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

BySubscriptionNameAndVersion

Get-AzBlueprint
    [-Version] <String>
    -Name <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ManagementGroupScope

Get-AzBlueprint
    -ManagementGroupId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Get one or more blueprint definitions. Blueprint definitions exist at the management group or subscription scope.

Examples

Example 1

Get-AzBlueprint
Name                 : PS-BlueprintDefinition
Id                   : /subscriptions/00000000-1111-0000-1111-000000000000/providers/Microsoft.Blueprint/blueprints/PS-BlueprintDefinition
SubscriptionId       : 00000000-1111-0000-1111-000000000000
Versions             : {1.0}
Description          : Powershell test blueprint
TimeCreated          : 2019-02-01
TargetScope          : Subscription
Parameters           : {storageData_storageAccountType, storageData_location, allowedlocations_listOfAllowedLocations}
ResourceGroups       : ResourceGroup

Get the blueprint definitions within the current subscription and the management group hierarchy of the subscription.

Example 2

Get-AzBlueprint -ManagementGroupId "myManagementGroupId"
Name                 : PS-MG-BlueprintDefinition
Id                   : /providers/Microsoft.Management/managementGroups/myManagementGroupId/providers/Microsoft.Blueprint/blueprints/PS-MG-BlueprintDefinition
ManagementGroupId    : myManagementGroupId
Versions             : {1.0, 2.0, 3.0, 4.0}
TimeCreated          : 2019-03-04
TargetScope          : Subscription
Parameters           : {enforcetaganditsvalue_tagName, enforcetaganditsvalue_tagValue, [Usergrouporapplicationname]:Contributor_RoleAssignmentName,
                       [Usergrouporapplicationname]:Owner_RoleAssignmentName}
ResourceGroups       : {ResourceGroup, ResourceGroup2}

Get the blueprint definitions within the specified management group.

Example 3

Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000"
Name                 : PS-BlueprintDefinition
Id                   : /subscriptions/00000000-1111-0000-1111-000000000000/providers/Microsoft.Blueprint/blueprints/PS-BlueprintDefinition
SubscriptionId       : 00000000-1111-0000-1111-000000000000
Versions             : {1.0}
Description          : Powershell test blueprint
TimeCreated          : 2019-02-01
TargetScope          : Subscription
Parameters           : {storageData_storageAccountType, storageData_location, allowedlocations_listOfAllowedLocations}
ResourceGroups       : ResourceGroup

Get the blueprint definitions within the specified subscription and the management group hierarchy of the subscription.

Example 4

Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000" -Name "myBlueprintName"

Get the blueprint definition with the given name within the specified subscription.

Example 5

Get-AzBlueprint -ManagementGroupId "myManagementGroupId" -Name "myBlueprintName" -Version "myBlueprintVersion"

Get the blueprint definition with the given name and version within the specified management group.

Example 6

Get-AzBlueprint -ManagementGroupId "myManagementGroupId" -Name "myBlueprintName" -LatestPublished

Get the latest published blueprint definition with the given name within the specified management group.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LatestPublished

The latest published blueprint definition flag. When set, execution returns the latest published version of the blueprint definition. Defaults to false.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByManagementGroupNameAndLatestPublished
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
BySubscriptionNameAndLatestPublished
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagementGroupId

Management Group Id where the blueprint definition is saved.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByManagementGroupNameAndVersion
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByManagementGroupAndName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByManagementGroupNameAndLatestPublished
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ManagementGroupScope
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

Blueprint definition name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByManagementGroupNameAndVersion
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByManagementGroupAndName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByManagementGroupNameAndLatestPublished
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionNameAndLatestPublished
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionNameAndVersion
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SubscriptionId

Subscription Id where the blueprint definition is saved.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SubscriptionScope
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionAndName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionNameAndLatestPublished
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionNameAndVersion
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Version

Published blueprint definition version.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByManagementGroupNameAndVersion
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
BySubscriptionNameAndVersion
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

Object