Azure Quickstart

Posted on Posted in SDL Web (SDL Tridion)

Here is a quick code sample to create a virtual machine from PowerShell on Windows Azure.

I use a variation of this script to quickly pop up VM’s to host SDL Tridion in the Cloud

Set-AzureSubscription -SubscriptionId "SUBSCRIPTION_ID" -SubscriptionName "SUBSCRIPTION_NAME" -CurrentStorageAccount "STORAGE_NAME"

#Windows Server 2012 with SQL Server 2012 SP1
$image = "fb83b3509582419d99629ce476bcb5c8__Microsoft-SQL-Server-2012SP1-Standard-CY13SU04-SQL2012-SP1-11.0.3350.0-Win2012"
$adminPassword = "PASSWORD"

#Get Location - Optional override to 'West US'
$locations = Get-AzureLocation
$myLoc = $locations[0].name

#Create VM
$vm = New-AzureVMConfig –ImageName $image –Name "ScriptedTdnVM" –InstanceSize "ExtraSmall" –HostCaching "ReadWrite" `
 | Add-AzureProvisioningConfig -Windows -AdminUsername "TridionAdmin" -Password $adminPassword `
 | Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel 'scriptedtdndisk' -LUN 0 `
 | New-AzureVM –ServiceName "ScriptedTridionEnvironment" -location $myLoc

Leave a Reply

Your email address will not be published. Required fields are marked *