Skip to content

Dev #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Mar 12, 2016
Merged

Dev #173

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d9434a2
Removed script modules and replaced with module dependencies
Feb 4, 2016
64aa44f
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Feb 5, 2016
1a6d6c5
Changed back AzureRM version
Feb 5, 2016
10b5158
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Feb 17, 2016
7ff78b6
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Feb 24, 2016
790474b
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Feb 26, 2016
ca2bfd4
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Feb 26, 2016
cb1d4f7
Merge branch 'release-1.2.2' of github.com:Azure/azure-powershell int…
Mar 2, 2016
88dac8e
Moving AzureRM publish to the end of publish process
Mar 2, 2016
21ba2e3
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Mar 7, 2016
789dfa1
updated minimum version of the AzureRM modules.
Mar 7, 2016
8574336
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Mar 8, 2016
cc21949
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Mar 9, 2016
5640275
Merge branch 'dev' of github.com:Azure/azure-powershell into AzureRmS…
Mar 10, 2016
28106c0
Added ranges to Profile dependencies
Mar 10, 2016
bf2c3c7
Fixing common assembly version
Mar 10, 2016
12ef78a
Fixed storage project dependency from Profile.
Mar 11, 2016
cf5e41b
Fixed SQL test to ignore UserAgent checks
Mar 11, 2016
ed2e651
Merge pull request #1775 from hovsepm/AzureRmShell
Mar 11, 2016
af305b4
Fix issue #1492 SubscriptionDataFile parameter in Import-AzurePublish…
markcowl Mar 11, 2016
daf5340
Merge pull request #462 from Azure/dev
huangpf Mar 11, 2016
19eaf20
readme updates #1522
markcowl Mar 12, 2016
044c33b
Merge pull request #1931 from Azure/docfix1
Mar 12, 2016
92de584
Merge pull request #465 from Azure/dev
huangpf Mar 12, 2016
02aade0
Merge pull request #1934 from Azure/readme-update
Mar 12, 2016
6978caa
Merge pull request #466 from Azure/dev
huangpf Mar 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 54 additions & 162 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,128 +9,57 @@ This repository contains a set of PowerShell cmdlets for developers and administ

## Features

* Account
* Get and import Azure publish settings
* Login with Microsoft account or Organizational account through Microsoft Azure Active Directory
* Account management
* Login with Microsoft account, Organizational account, or Service Principal through Microsoft Azure Active Directory
* Save Credentials to disk with Save-AzureRmProfile and load saved credentials using Select-AzureRmProfile
* Environment
* Get the different out-of-box Microsoft 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.
* Manage slot
* Manage WebJob
* Deploy project via WebDeploy
* Diagnostics
* Configure site and application diagnostics
* Log streaming
* Save log
* Cloud Services
* Create scaffolding for cloud service and role. Role support includes Node.js and PHP.
* Manage cloud service and role, such as CRUD, start and stop.
* Manage extension.
* Start/Stop Azure emulator.
* Manage certificate.
* Manage cloud service extensions
* Remote desktop
* Diagnostics
* Microsoft Antimalware
* Windows Azure Diagnostics
* Storage
* Manage storage account and access key.
* Manage storage container and blob, with paging.
* Copy storage blob.
* Manage storage table.
* Manage storage queue.
* Create SAS token.
* Manage metrics and logging.
* Configure timeout
* SQL Database
* CRUD support for database server, database and firewall rule.
* Get database server quota.
* Get/Set database server service objective.
* Manage database copies and active geo-replication.
* Get dropped databases that can be restored.
* Issue requests to restore a live or dropped database to a point in time.
* Issue requests to recover a database from an unavailable database server.
* Manage database and database server auditing policy.
* Service Bus
* Manage service bus namespaces.
* VM
* Manage VM, such as CRUD, import/export and start/stop/restart.
* Manage VM image and VM image disks.
* 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
* Manage extension
* BG Info
* Chef
* Puppet
* Custom Script
* Access
* Microsoft Antimalware
* PowerShell DSC
* Windows Azure Diagnostics
* Public IP, reserved IP and internal load balancer
* 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.
* Manage static IP
* Azure Media Services
* Create, read and delete Media Services Accounts
* Generate new account keys for Media Services Accounts
* HDInsight
* Manage clusters, such as CRUD, add/set storage
* Manage jobs, such as CRUD, start/stop/wait/invoke
* Manage HTTP service access. such as grant/revoke
* Store
* View available Microsoft Azure Store Add-On plans.
* Purchase, view, upgrade and remove Microsoft Azure Store Add-On instances.
* Utility
* Test whether a name is available. 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.
* Add/Set/Remove customized environments (like your Azure Stack or Windows Azure Pack environments)
* Management and data plane cmdlets for Azure services in ARM and RDFE
* VM
* Storage
* Network
* App Service (Websites)
* SQL Database
* KeyVault
* Operational Insights
* Automation
* Batch
* Backup
* RecoveryServices and SiteRecovery
* Stream Analytics
* Traffic Manager
* DataFactories
* DNS
* HDInsight
* Express Route
* Scheduler
* StorSimple
* Redis Cache

* Windows Azure Pack
* Web Site: CRUD web site, deployment, configure and get log, start/stop/restart/show web site
* Service Bus: CRD namespace
* VM: CRUD VM, get OS disk, size profile and VM template, start/stop/restart/suspend/resume VM
* VNET: CRUD VNET and subnet.
* Cloud Service: CRUD cloud service.
* ExpressRoute
* Manage dedicated circuit
* Manage BGP peering
* Scheduler
* Manage job collections
* Manage HTTP and storage queue jobs
* Resource Manager
* Manage resource groups and deployments
* Query and download gallery templates
* Manage individual resources
* Traffic Manager
* Manage profiles and endpoints
* Azure Automation
* Manage automation accounts
* Manage automation jobs, runbooks and schedules
* Windows Azure Stack
* Azure Stack Administration
* Storage Servcie Management


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 azurerm``` to get all the Azure Resource Manaber (ARM) cmdlets.
* ```help <cmdlet name>``` to get the details of a specific cmdlet.

## Supported Environments

* [Microsoft Azure](http://www.azure.microsoft.com)
* [Azure Stack](https://azure.microsoft.com/en-us/overview/azure-stack/)
* [Windows Azure Pack](http://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx)
* [Microsoft Azure China](http://www.windowsazure.cn/)
* [USGovernment](https://azure.microsoft.com/en-us/features/gov/)

## Installation

Expand All @@ -142,27 +71,31 @@ For detail descriptions and examples of the cmdlets, type

You can also find the standalone installers for all the versions at [Downloads](https://github.com/Azure/azure-powershell/releases)

### PowerShell Gallery
1. Install [Windows Management Framework 5 ot PowerShellGet cmdlets](https://www.powershellgallery.com/GettingStarted?section=Get%20Started)
2. In an elevated PowerShell session, run ```Install-Module AzureRM```
3. run ```Install-AzureRm```
4. Top install RDFE cmdlets, run ```Install-Module Azure```

### Source Code

1. Download the source code from GitHub repo
2. Follow the [Microsoft Azure PowerShell Developer Guide](https://github.com/Azure/azure-powershell/wiki/Microsoft-Azure-PowerShell-Developer-Guide)

### Supported PowerShell Versions

* 0.6.9 or lower
* [Windows PowerShell 2.0](http://technet.microsoft.com/en-us/scriptcenter/dd742419)
* [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595)
* 0.6.10 to higher
* [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595)
* [Windows Management Framework 3] (http://www.microsoft.com/en-us/download/details.aspx?id=34595)
* [Windows Management Framework 4] (https://www.microsoft.com/en-us/download/details.aspx?id=40855)
* [Windows Management Framework 5] (https://www.microsoft.com/en-us/download/details.aspx?id=50395)

## Get Started

In general, following are the steps to start using Microsoft Azure PowerShell

* Get yourself authenticated with Microsoft Azure. For details, please check out [this article](http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/).
* Option 1: Login with your Microsoft account or Organizational account directly from PowerShell. Microsoft Azure Active Directory authentication is used in this case. No management certificate is needed.
* Starting from 0.8.6, you can use ``Add-AzureAccount -Credential`` to avoid the browser pop up for Organizational account.
* Option 2: Download and import a publish settings file which contains a management certificate.
* Starting from 1.0.0, you can use ```Add-AzureRmAccount -Credential``` to avoid the browser pop up for Organizational account.
* To use RDFE cmdlets, use ```Add-AzureAccount```
* Use the cmdlets

The first step can be different for different environment you are targeting. Following are detail instructions for each supported environment.
Expand All @@ -175,46 +108,19 @@ If you use both mechanisms on the same subscription, Microsoft Azure Active Dire

```powershell
# Pop up an embedded browser control for you to login
Add-AzureAccount
Add-AzureRmAccount

# use the cmdlets to manage your services/applications
New-AzureWebsite -Name mywebsite -Location "West US"
```

#### Use publish settings file (Management certificate authentication)

```powershell
# 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"
New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"
```

### Microsoft Azure China

```powershell
# Check the environment supported by your Microsoft Azure PowerShell installation.
Get-AzureEnvironment

# Download a file which contains the publish settings information of your subscription.
# Use the -Environment parameter to target Microsoft Azure China.
# This will open a browser window and ask you to log in to get the file.
Get-AzurePublishSettingsFile -Environment "AzureChinaCloud"
Add-AzureRmAccount -EnvironmentName 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"
# use the cmdlets to manage your services/applications
New-AzureRmResourceGroup -Name myresourceGroup -Location "Chine East"
```

### Windows Azure Pack
Expand Down Expand Up @@ -245,35 +151,21 @@ Import-WAPackPublishSettingsFile "<file location>"
# Use the cmdlets to manage your services/applications
New-WAPackWebsite -Name mywebsite
```
## 2 Modes

Starting from 0.8.0, we are adding a separate mode for Resource Manager. You can use the following cmdlet to switch between the

* Service management: cmdlets using the Azure service management API
* Resource manager: cmdlets using the Azure Resource Manager API

They are not designed to work together.

```powershell
Switch-AzureMode AzureServiceManagement
Switch-AzureMode AzureResourceManager
```

## Find Your Way

All the cmdlets can be put into 3 categories:

1. Cmdlets support both Microsoft Azure and Windows Azure Pack
2. Cmdlets only support both Microsoft Azure
3. Cmdlets only support Windows Azure Pack
1. ARM management cmdlets use the noun 'AzureRm' (New-AzureRmResourceGroup, Get-AzureRmVM)
2. Legacy RDFE management cmdlets use the noun 'Azure' (Get-AzureVM)
3. Data plane cmdlets that work in ARM or RDFE use the noun Azure (Get-AzureBlob)

* 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

```powershell
# Return all the cmdlets for Azure Resource Manager (ARM)
Get-Command *AzureRm*
# Return all the cmdlets for Microsoft Azure
Get-Command *Azure*

Expand Down
4 changes: 0 additions & 4 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@
<!-- Copying shortcut to be signed -->
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />

<ItemGroup>
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
Expand Down Expand Up @@ -258,8 +256,6 @@
<!-- Copying signed shortcut back -->
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psd1"
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psm1"
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
</Target>

<Target Name="CodeSignInstaller">
Expand Down
4 changes: 2 additions & 2 deletions src/Common/Commands.Common/AzurePowerShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class AzurePowerShell

public const string AssemblyCopyright = "Copyright © Microsoft";

public const string AssemblyVersion = "1.0.0";
public const string AssemblyVersion = "1.0.5";

public const string AssemblyFileVersion = "1.0.4";
public const string AssemblyFileVersion = "1.0.5";

public const string ProfileFile = "AzureProfile.json";

Expand Down
2 changes: 1 addition & 1 deletion src/Common/Storage/Azure.Storage.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceManager/Automation/AzureRM.Automation.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceManager/AzureBackup/AzureRM.Backup.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceManager/AzureBatch/AzureRM.Batch.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CLRVersion = '4.0'
ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.4'})

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.4'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceManager/Compute/AzureRM.Compute.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
Loading