Skip to content

Instantly share code, notes, and snippets.

@ploegert
Created July 14, 2015 15:39
Show Gist options
  • Select an option

  • Save ploegert/53fa3a351597aa4b98fa to your computer and use it in GitHub Desktop.

Select an option

Save ploegert/53fa3a351597aa4b98fa to your computer and use it in GitHub Desktop.
Publish PowerShell DSC Configuration to Azure Storage Account After saving the DSC Configuration as a local PowerShell script file, we'll need to publish this configuration to an Azure Storage Account container so that the Azure VMs we are provisioning will be able to access it. To perform this publishing process, we'll use the Azure PowerShell …
# Authenticate to Azure
Add-AzureAccount
# Select Azure Subscription and Storage Account
$subscriptionName = (Get-AzureSubscription).SubscriptionName |
Out-GridView `
-Title "Select Your Azure Subcription" `
-PassThru
Select-AzureSubscription `
-SubscriptionName $subscriptionName
$storageName = (Get-AzureStorageAccount).StorageAccountName |
Out-GridView `
-Title "Select Your Azure Storage Account" `
-PassThru
Set-AzureSubscription `
-SubscriptionName $subscriptionName `
-CurrentStorageAccountName $storageName
# Publish DSC Configuration to Azure Storage Account
Publish-AzureVMDscConfiguration `
-ConfigurationPath .\AADSCWebConfig.ps1 `
-Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment