Created
July 14, 2015 15:39
-
-
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 …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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