Skip to main content

Mange Azure Using Power Shell Scripts

Here are a few Power Shell Scripts that are handy in speeding up things even further in terms of Provisioning, Starting up or Stopping a Virtual Machine.
How to Provision a Virtual Machine using our custom Image?
# The VM, Service, and Image Name's
$vmName = "myFirstVM"
$svcName = "myCloudService"
$imageName = "myImage"
# Setup the New Azure VM Configurations
$newVM = New-AzureVMConfig -Name $vmName -InstanceSize $instanceSize -ImageName $imageName
$newVM | Add-AzureEndpoint -Name 'Remote Desktop' -Protocol tcp -LocalPort 3389 -PublicPort 51000
$newVM | Add-AzureEndpoint -Name 'PowerShell' -Protocol tcp -LocalPort 5986 -PublicPort 5986
# Create the new Azure Cloud Service
$checkNewAS = New-AzureService -ServiceName $svcName -Location $location -Label $svcName
# Create the new Azure VM
$checkNewAVM = New-AzureVM -ServiceName $svcName -Location $location -VMs $newVM

How to Start Up a Virtual Machine?
$start = Start-AzureVM -Name $vmName -ServiceName $svcName
How to Stop a Virtual Machine?
$stop = Stop-AzureVM -Name $vmName -ServiceName $svcName
Important:
  • Download and Install the Azure Power Shell SDK, for the above to workhttp://azure.microsoft.com/en-in/downloads/
  • Add your Azure Account to Power Shell Via:$cred = Get-CredentialAdd-AzureAccount -Credential $cred​

Comments

Post a Comment

Popular posts from this blog

Apple's iPhone 4.0 software to deliver multitasking support

Apple this summer will go a long way towards silencing critics and catering to one of the most prevalent demands of its iPhone user base, when it introduces a multitasking solution through the handset's 4.0 software update that will finally allow several third party apps to run concurrently and in the background. For more Info.

768-bit RSA cracked, 1024-bit safe (for now)

With the increasing computing power available to even casual users, the security-conscious have had to move on to increasingly robust encryption, lest they find their information vulnerable to brute-force attacks. The latest milestone to fall is 768-bit RSA; in a paper posted on a cryptography preprint server, academic researchers have now announced that they factored one of these keys in early December. Most modern cryptography relies on single large numbers that are the product of two primes. If you know the numbers, it's relatively easy to encrypt and decrypt data; if you don't, finding the numbers by brute force is a big computational challenge. But this challenge gets easier every year as processor speed and efficiency increase, making "secure" a bit of a moving target. The paper describes how the process was done with commodity hardware, albeit lots of it. Their first step involved sieving, or identifying appropriate integers; that took the equivalent of 1,500 y...

20 Things We Already Know About Apple’s iTablet