This repository contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage Windows Azure applications.
- For documentation on how to build and deploy applications to Windows Azure please see the Windows Azure Developer Center.
- For comprehensive documentation on the developer cmdlets see How to use Windows Azure PowerShell.
- For comprehensive documentation on the full set of Windows Azure cmdlets see Windows Azure Management Center.
- Account
- Get and import Azure publish settings
- Environment
- Get the differnet out-of-box Windows Azure environments
- Add/Set/Remove customized environments (like your Windows Azure Pack environments)
- Get Azure publish settings for a particular environment
- Subscription
- Manage Azure subscription
- Manage AffinityGroup
- Website
- Manage website, such as CRUD, start and stop.
- Diagnostics
- Configure site and application diagnostics
- Log streaming
- Save log
- Cloud Services
- Create scaffolding for cloud service and role. Role support includes Node.js, PHP, Django and Cache.
- Manage cloud service and role, such as CRUD, start and stop.
- Enable/Disable remote desktop.
- Start/Stop Azure emulator.
- Manage certificate.
- Manage cloud service extensions
- Remote desktoo
- Diagnostics
- Storage
- Manage storage account and access key.
- Manage storage container and blob.
- Copy storage blob.
- Manage storage table.
- Manage storage queue.
- SQL Azure
- CRUD support for database server, database and firewall rule.
- Get database server quota.
- Get/Set database server service objective.
- Service Bus
- Manage service bus namespaces.
- VM
- Manage VM, such as CRUD, import/export and start/stop/restart.
- Manage VM image, such as CRUD.
- Manage disk, such as CRUD.
- Manage VM endpoint, such as CRUD and ACL.
- Get/Set VM sub net.
- Manage certificate and SSH key.
- PowerShell remoting
- Deployment
- Manage deployment, such as CRUD, move, upgrade and restore.
- Get/Create DNS settings of a deployment.
- VNet
- Manage virtual network config, connection and gateway.
- Store
- View available Windows Azure Store Add-On plans.
- Purchase, view, upgrade and remove Windows Azure Store Add-On instances.
- Utility
- Test whether a name is avaiable. Currently support cloud service name, storage account name and service bus namespace name.
- Get the list of geo locations supported by Azure.
- Get the list of OS supported by Azure.
- Direct you to Azure portal.
For detail descriptions and examples of the cmdlets, type
help azure
to get all the cmdlets.help node-dev
to get all Node.js development related cmdlets.help php-dev
to get all PHP development related cmdlets.help python-dev
to get all Python development related cmdlets.help <cmdlet name>
to get the details of a specific cmdlet.
- Install Microsoft Web Platform Installer.
- Open Microsoft Web Platform Installer and search for Windows Azure PowerShell.
- Install.
You can also find the standalone installers for all the versions at Downloads
- Download the source code from GitHub repo
- Follow the Windows Azure PowerShell Developer Guide
- 0.6.9 or lower
- 0.6.10 to higher
In general, following are the steps to start using Windows Azure PowerShell
- Get the publish settings information of your subscription
- Import the information into Windows Azure PowerShell
- Use the cmdlets
The first step can be different for different environment you are targeting. Following are detail instructions for each supported environment.
# Download a file which contains the publish settings information of your subscription.
# This will open a browser window and ask you to log in to get the file.
Get-AzurePublishSettingsFile
# Import the file you just downloaded.
# Notice that the file contains credential of your subscription so you don't want to make it public
# (like check in to source control, etc.).
Import-AzurePublishSettingsFile "<file location>"
# Use the cmdlets to manage your services/applications
New-AzureWebsite -Name mywebsite -Location "West US"
# Check the environment supported by your Windows Azure PowerShell installation.
Get-AzureEnvironment
# Download a file which contains the publish settings information of your subscription.
# Use the -Environment parameter to target Windows Azure China.
# This will open a browser window and ask you to log in to get the file.
Get-AzurePublishSettingsFile -Environment "AzureChinaCloud"
# Import the file you just downloaded.
# Notice that the file contains credential of your subscription so you don't want to make it public
# (like check in to source control, etc.).
Import-AzurePublishSettingsFile "<file location>"
# Use the cmdlets to manage your services/applications
New-AzureWebsite -Name mywebsite -Location "China East"
# Add your Windows Azure Pack environment to your Windows Azure PowerShell installation.
# You will need to know the following information of your Windows Azure Pack environment.
# 1. URL to download the publish settings file Mandatory
# 2. Management service endpoint Optional
# 3. Management Portal URL Optional
# 4. Storage service endpoint Optional
Add-WAPackEnvironment -Name "MyWAPackEnv" `
-PublishSettingsFileUrl "URL to download the publish settings file>" `
-ServiceEndpoint "<Management service endpoint>" `
-ManagementPortalUrl "<Storage service endpoint>" `
-StorageEndpoint "<Management Portal URL>"
# Download a file which contains the publish settings information of your subscription.
# Use the -Environment parameter to target your Windows Azure Pack environment.
# This will open a browser window and ask you to log in to get the file.
Get-WAPackPublishSettingsFile -Environment "MyWAPackEnv"
# Import the file you just downloaded.
# Notice that the file contains credential of your subscription so you don't want to make it public
# (like check in to source control, etc.).
Import-WAPackPublishSettingsFile "<file location>"
# Use the cmdlets to manage your services/applications
New-WAPackWebsite -Name mywebsite
All the cmdlets can be put into 3 categories:
- Cmdlets support both Windows Azure and Windows Azure Pack
- Cmdlets only support both Windows Azure
- Cmdlets only support Windows Azure Pack
- For category 1, we are using an "Azure" prefix in the cmdlet name and adding an alias with "WAPack" prefix.
- For category 2, we are using an "Azure" prefix in the cmdlet name.
- For category 2, we are using an "WAPack" prefix in the cmdlet name.
So you can use the following cmdlet to find out all the cmdlets for your environment
# Return all the cmdlets for Windows Azure
Get-Command *Azure*
# Return all the cmdlets for Windows Azure Pack
Get-Command *WAPack*
If you want to migrate some scripts from Windows Azure to Windows Azure Pack or vice versa, as long as the cmdlets you are using are in category 1, you should be able to migrate smoothly.
Be sure to check out the Windows Azure Developer Forums on Stack Overflow if you have trouble with the provided code.
If you would like to become an active contributor to this project please follow the instructions provided in Windows Azure Projects Contribution Guidelines.
If you encounter any bugs with the library please file an issue in the Issues section of the project.