< Back

Publish-AzureVMDscConfiguration

Wed Jan 30, 2019 5:50 pm

NAME Publish-AzureVMDscConfiguration



SYNOPSIS

Publishes a desired state configuration script to Azure blob storage.





SYNTAX

Publish-AzureVMDscConfiguration [-ConfigurationPath] <String> [-ContainerName <String>] [-Force] [-StorageContext <AzureStorageContext>]

[-StorageEndpointSuffix <String>] [-SkipDependencyDetection] [-ConfigurationDataPath <String>] [-AdditionalPath <String[]>] [-PassThru] [-Profile

<AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]



Publish-AzureVMDscConfiguration [-ConfigurationPath] <String> [-Force] [-SkipDependencyDetection] [-ConfigurationDataPath <String>] [-AdditionalPath

<String[]>] [-PassThru] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm]

[-ConfigurationArchivePath <String>] [<CommonParameters>]





DESCRIPTION

The Publish-AzureVMDscConfiguration cmdlet publishes a desired state configuration script to Azure blob storage, which later can be applied to Azure

virtual machines using the Set-AzureVMDscExtension cmdlet.





PARAMETERS

-ConfigurationPath <String>

Specifies the path of a file that contains one or more configurations. The file can be a Windows PowerShell script (.ps1 file), module (.psm1 file),

or an archive (.zip file) that contains a set of Windows PowerShell modules, with each module in a separate directory.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-ContainerName <String>

Specifies the name of the Azure storage container the configuration is uploaded to.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-StorageContext <AzureStorageContext>

Specifies the Azure storage context that provides the security settings used to upload the configuration script to the container specified by the

ContainerName parameter. This context provides write access to the container.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageEndpointSuffix <String>

Specifies the suffix for the storage end-point, for instance, core.contoso.net



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SkipDependencyDetection [<SwitchParameter>]





Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ConfigurationDataPath <String>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AdditionalPath <String[]>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]





Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ConfigurationArchivePath <String>

Specifies the path of a local .zip file that this cmdlet writes the configuration archive. The configuration script is not uploaded to Azure blob

storage if you use this parameter.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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



OUTPUTS



NOTES









-------------------------- Example 1: Publish a state configuration script to blob storage --------------------------



PS C:\\>Publish-AzureVMDscConfiguration .\\MyConfiguration.ps1



This command creates a .zip package for the given script and any dependent resource modules and uploads it to Azure storage.

-------------------------- Example 2: Publish a state configuration script to a local file --------------------------



PS C:\\>Publish-AzureVMDscConfiguration .\\MyConfiguration.ps1 -ConfigurationArchivePath .\\MyConfiguration.ps1.zip



This command creates a .zip package for the given script and any dependent resource modules and stores it in the local file .\\MyConfiguration.ps1.zip.



RELATED LINKS

Set-AzureVMDscExtension