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

OnePlus 3T in 2017

Hi there, I just bought OnePlus 3T, why? Even when OnePlus 5 is out and OnePlus 5T looming around the corner. Top five reasons why the 3T might just be a very sound investment if you are in the market for a new phone. 3T is going for a relatively cheap price. Its wickedly fast. Its 1080p display. Its software. OnePlus 5 isnt a huge update. Key Specs Display - 5.50-inch Processor - 1.6GHz quad-core Front Camera - 16-megapixel Resolution - 1080x1920 pixels RAM - 6GB OS - Android 7.1.1 Storage - 64GB Rear Camera - 16-megapixel Battery Capacity - 3400mAh Overall Rating 9/10 - Design 9/10 - Display 9/10 - Software 9/10 - Performance 9/10 - Battery life 9/10 - Camera 9/10 - Value for money Important - No other phone with all round 9's. Good Solid system and app performance Very good battery life Competent set of cameras Amazing premium build quality Good value for money Bad Nothing as yet

Google tablet to give Apple a touch of its own medicine

Google is trying to one-up Apple, showing off designs for a new tablet computer based on its Chrome operating system that would be a direct rival to the iPad. Just weeks after launching its own iPhone competitor in the US, the Nexus One, Google might soon extend its competition with Apple further as it seeks to push its search and other products on to as many devices as possible. Google's user interface designer, Glen Murphy, published mock-ups of a Google tablet on the search giant's Chromium.org website, along with a video of how users would interact with the device. Late last year Google announced Chrome OS, an operating system predominantly for small netbooks that would be based around the web browser, providing quick boot times and easy access to Google's array of online services. The first Chrome OS netbooks are due to arrive this year, but Google is now considering extending the platform to other devices including tablets, desktops and even big screen TVs. Chrome OS ...

Keyboard First Impressions: Kinesis Advantage Mechanical Ergonomic Keyboard

An ergonomic keyboard with mechanical switches that’s looking to attract users interesting in a high quality, highly ergonomic offering and don’t mind the rather steep learning curve or the price. The  TECK  isn’t the only such keyboard, of course, and I decided to see what other mechanical switch ergonomic keyboards I could get for comparison. Next up on the list is the granddaddy of high-end ergonomic keyboards, the  Kinesis Contour Advantage . I wanted to provide my first impressions of the Kinesis, along with some thoughts on the initial switch and the learning curve. This time, I also made the effort to put together a video of my first few minutes of typing. It actually wasn’t as bad as with the TECK, but that’s likely due to the fact that I already lost many of my typing conventions when I made that switch earlier this year. I’ll start with the video, where I take a typing test on four different keyboards and provide some thoughts on the experience, and then ...