Save-AzManagementGroupDeploymentStackTemplate
Saves a Management Group scoped Deployment Stack Template.
Syntax
SaveByNameAndManagementGroupId (Default)
Save-AzManagementGroupDeploymentStackTemplate
[-StackName] <String>
[-ManagementGroupId] <String>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SaveByResourceId
Save-AzManagementGroupDeploymentStackTemplate
-ResourceId <String>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SaveByStackObject
Save-AzManagementGroupDeploymentStackTemplate
[-InputObjet] <PSDeploymentStack>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Saves a template (or template link) for a management group scoped deployment stack.
Examples
Example 1: Save the template used for the deployment stack named MyManagementGroup at MyManagementGroup management group
Save-AzManagementGroupDeploymentStackTemplate -ManagementGroupId MyManagementGroup -StackName MyMGStack
Save a template (or template link) from a stack named 'MyMGStack' under an MG named 'MyManagementGroup'.
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
The stack PS object
SaveByStackObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagementGroupId
The id of the ManagementGroup where the DeploymentStack is deployed
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SaveByNameAndManagementGroupId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Pre
When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
ResourceId of the DeploymentStack to get
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Id
Parameter sets
SaveByResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-StackName
The name of the DeploymentStack to get
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SaveByNameAndManagementGroupId
Position: 1
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 .
Outputs