< Back

Get-AzureBlueprintImportParameters

Sat Jan 11, 2020 8:23 am

NAME Get-AzureBlueprintImportParameters



SYNOPSIS

Prepares parameters for the Import-AzureBlueprintArtifact





SYNTAX

Get-AzureBlueprintImportParameters [[-ARMTemplateDirectory] <DirectoryInfo>] [-UseFilenameAsArtifactname]

[<CommonParameters>]





DESCRIPTION

This Cmdlet prepares imput objects for the Import-AzureBlueprintArtifact. It takes host input for REsource Groups

names and optionally artifact names and creates objects that can be piped to the Import-AzureBlueprintArtifact

cmdlet





PARAMETERS

-ARMTemplateDirectory <DirectoryInfo>

Location of the ARM templates to import



Required? false

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UseFilenameAsArtifactname [<SwitchParameter>]

Switch that allows the filename to become the artifact name. If omitted, artifact name has to be supplied for

each ARM template file



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

System.Object







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> $props = Get-AzureBlueprintImportParameters -ARMTemplateDirectory C:\\dev\\ARMTemplates\\



ArtifactName for batchwithstorage.json: bst

Resource Group name for batchwithstorage.json: rg1

ArtifactName for NoMeta.json: nom

Resource Group name for NoMeta.json: rg2



$Props | Import-AzureBlueprintArtifact -TargetDirectory C:\\dev\\MyNewMultiRGBlueprint



first store the parameters in the $props variable and the pipe the parameters to the

Import-AzureBlueprintArtifact. In this example the ArtifactName can be changed.

-------------------------- Example 1 --------------------------



PS C:\\> Get-AzureBlueprintImportParameters -ARMTemplateDirectory C:\\dev\\ARMTemplates\\ -UseFilenameAsArtifactname |

Import-AzureBlueprintArtifact -TargetDirectory C:\\dev\\MyNewMultiRGBlueprint



Resource Group name for batchwithstorage.json: rg1

Resource Group name for NoMeta.json: rg2



Here the parameters are created with the UseFilenameAsArtifactname switch. Filenames are used for the Artifact

name. Furthermore the result is piped directly to the Import-AzureBlueprintArtifact cmdlet only adding the

TargetDirectory path



RELATED LINKS