Microsoft Azure PowerShell
Перейти к файлу
Scott Phibbs 42a2939c92
Update License.rtf
RIpped out unnecessary formatting added by word that caused a view issue inside the msi
2018-05-10 13:44:28 -07:00
.github Update PULL_REQUEST_TEMPLATE.md 2018-03-20 15:29:56 +02:00
documentation Update azure-powershell-design-guidelines.md 2018-05-09 13:06:40 -07:00
setup Update License.rtf 2018-05-10 13:44:28 -07:00
src Update Set-AzureRmVirtualNetwork.md 2018-05-09 15:40:34 -07:00
tools Merge pull request #6141 from cormacpayne/fix-profile 2018-05-07 18:34:30 -07:00
.dockerignore Netcore build fixes. 2017-12-05 16:30:59 -08:00
.gitattributes identified psd1, psm1, and ps1xml as text files 2017-10-31 16:10:40 -03:00
.gitignore Cleaned up .gitignore. Added logic to include Prerelease if it is set. Added validation for FunctionsToExport. Change @class variables to targetClass. 2018-04-19 14:38:27 -07:00
.travis.yml Fix issues with netcore and desktop tests, clean up build files 2018-04-15 22:54:10 -07:00
Azure.PowerShell.Netcore.sln Enable NetCore scenario tests and set up scenario test build 2018-04-13 13:29:03 -07:00
AzurePowershell.Test.targets Remove deprecated SiteRecovery project 2018-04-16 10:55:34 -07:00
CONTRIBUTING.md Took care of review comments for documentation and added a few more 2018-03-26 12:27:30 -07:00
ChangeLog.md Remove entries in Profile psd1 and change log 2018-05-01 09:52:12 -07:00
Dockerfile Netcore build fixes. 2017-12-05 16:30:59 -08:00
LICENSE.txt Update LICENSE.txt 2018-05-10 08:51:09 -07:00
NuGet.config Netcore + KeyVault + Docker + Travis. 2017-11-27 14:18:54 -08:00
README.md Update README.md 2018-04-10 17:46:05 -07:00
TestMappings.json remove added test 2018-05-02 13:45:26 -07:00
appveyor.yml Fix bug in appveyor.yml 2018-05-08 14:06:26 +08:00
build.proj Merge branch 'release-2018-04-06' of github.com:/azure/azure-powershell into netcore-011a 2018-04-05 14:21:23 -07:00
packages.config Upgraded xunit to version 2.1.0 2016-02-10 18:17:51 -08:00

README.md

Microsoft Azure PowerShell

This repository contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage Microsoft Azure applications.

Take a test run now from Azure Cloud Shell!

Modules

Below is a table containing the various Azure PowerShell rollup modules found in this repository. For a full list of modules found in this repository, please see the Azure PowerShell Modules page.

Description Module Name PowerShell Gallery Link
Rollup Module for ARM Cmdlets AzureRM AzureRM
Rollup Module for .NET Core Cmdlets AzureRM.Netcore AzureRM.Netcore
Rollup Module for Administrative Modules in Azure Stack AzureStack AzureStack
Rollup Module for Service Management Cmdlets Azure Azure

Installation

For more detailed instructions on installing Azure PowerShell, please refer to the installation guide.

Run the following command in an elevated PowerShell session to install the rollup module for Azure Resource Manager cmdlets:

Install-Module -Name AzureRM

To install the module containing the legacy RDFE cmdlets, run the following command in an elevated PowerShell session:

Install-Module -Name Azure

If you have an earlier version of the Azure PowerShell modules installed from the PowerShell Gallery and would like to update to the latest version, run the following commands in an elevated PowerShell session. Update-Module installs the new version side-by-side with the old version. It does not remove the old version.

# Update to the latest version of AzureRM
Update-Module -Name AzureRM

# Update to the latest version of Azure
Update-Module -Name Azure

Web Platform Installer

Download and install the Microsoft Web Platform Installer. Once installed, open the program and search for Microsoft Azure PowerShell. Click the Add button followed by the Install button at the bottom to begin the installation process.

Usage

For more detailed instructions on using Azure PowerShell, please refer to the getting started guide.

Log in to Azure

To connect to Azure, use the Connect-AzureRmAccount cmdlet.

# Interactive login - you will get a dialog box asking for your Azure credentials
Connect-AzureRmAccount

# Non-interactive login - you will need to use a service principal
Connect-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $PSCredential -TenantId $TenantId

To log into a specific cloud (AzureChinaCloud, AzureCloud, AzureGermanCloud, AzureUSGovernment), use the Environment parameter:

# Log into a specific cloud - in this case, the Azure China cloud
Connect-AzureRmAccount -Environment AzureChinaCloud

Getting and setting your session context

To view the context you are using in the current session, which contains the subscription and tenant, use the Get-AzureRmContext cmdlet:

# Get the context you are currently using
Get-AzureRmContext

# List all available contexts in the current session
Get-AzureRmContext -ListAvailable

To get the subscriptions in a tenant, use the Get-AzureRmSubscription cmdlet:

# Get all of the subscriptions in your current tenant
Get-AzureRmSubscription

# Get all of the subscriptions in a specific tenant
Get-AzureRmSubscription -TenantId $TenantId

To change the subscription that you are using for your current context, use the Set-AzureRmContext cmdlet:

# Set the context to a specific subscription
Set-AzureRmContext -Subscription $SubscriptionName -Name "MyContext"

# Set the context using piping
Get-AzureRmSubscription -SubscriptionName $SubscriptionName | Set-AzureRmContext -Name "MyContext"

Discovering cmdlets

Use the Get-Command cmdlet to discover cmdlets within a specific module, or cmdlets that follow a specific search pattern:

# View all cmdlets in the AzureRM.Profile module
Get-Command -Module AzureRM.Profile

# View all cmdlets that contain "VirtualNetwork"
Get-Command -Name "*VirtualNetwork*"

# View all cmdlets that contain "VM" in the AzureRM.Compute module
Get-Command -Module AzureRM.Compute -Name "*VM*"

Cmdlet help and examples

To view the help content for a cmdlet, use the Get-Help cmdlet:

# View the basic help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription

# View the examples for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Examples

# View the full help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Full

# View the help content for Get-AzureRmSubscription on https://docs.microsoft.com
Get-Help -Name Get-AzureRmSubscription -Online

Reporting Issues and Feedback

Issues

If you find any bugs when using the Azure PowerShell modules, please file an issue here, making sure to fill out the provided template with the appropriate information.

Alternatively, be sure to check out the Azure Support Community if you have trouble with any of the cmdlets or Azure services.

Feedback

If there is a feature you would like to see in Azure PowerShell, please use the Send-Feedback cmdlet, or file an issue here, to send the team direct feedback.

Contribute Code

If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.

More information about contributing to this repo can be found in CONTRIBUTING md and the Azure PowerShell Developer Guide folder.

Learn More


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.