Useful Azure Powershell Commands

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Before you start using Power Shell for Microsoft Azure you will have to get in touch with account and subscription related command-lets.

Subscription Commands

get-command | Where Name -Like "*Subsc*"

Get-AzureSubscription
Select-AzureSubscription
Set-AzureSubscription

Account Commands

get-command | Where Name -Like "*account*"

Add-AzureAccount
Get-AzureAccount
Get-AzureAutomationAccount
Get-AzureMediaServicesAccount
Get-AzureStorageAccount
New-AzureMediaServicesAccount
New-AzureStorageAccount
Remove-AzureAccount
Remove-AzureMediaServicesAccount
Remove-AzureStorageAccount
Set-AzureStorageAccount


Logon and download all subscriptions under account specified on logon
add-azureaccount

Notice subscription which you want to operate on and execute:
select-azuresubscription Windows Azure Platform Enterprise

Now you can use power shell. For example, following script shows how to create the cache:

New-AzureManagedCache -Name abcazcache -Location "West Europe" -Sku Basic -Memory 128MB

VERBOSE: Initializing parameters...
VERBOSE: Creating prerequisites...
VERBOSE: Verify cache service name...
VERBOSE: Creating cache service...
VERBOSE: Waiting for cache service to be in ready state...

Name     : abcache
Location : West Europe
State    : Active
Sku      : Basic
Memory   : 128MB


Posted Jul 08 2014, 09:00 AM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.