Skip to content

Instantly share code, notes, and snippets.

@bobalob
Created February 14, 2017 20:44
Show Gist options
  • Save bobalob/345bbe8dba3a1f2731d8fb0d9a70d1ce to your computer and use it in GitHub Desktop.
Save bobalob/345bbe8dba3a1f2731d8fb0d9a70d1ce to your computer and use it in GitHub Desktop.
$resourceGroup = "DSC-Test-Resources"
$location = "northeu"
$vmName = "MyCoolVM"
$storageName = "dsctestresourcesdisks871"
#Publish the configuration script into user storage
Publish-AzureRmVMDscConfiguration -ConfigurationPath .\dsc-webserver.ps1 `
-ResourceGroupName $resourceGroup -StorageAccountName $storageName -force
#Set the VM to run the DSC configuration
Set-AzureRmVmDscExtension -Version 2.21 -ResourceGroupName $resourceGroup `
-VMName $vmName -ArchiveStorageAccountName $storageName `
-ArchiveBlobName dsc-webserver.ps1.zip -AutoUpdate:$true `
-ConfigurationName "DSCWebServer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment