Installing Azure Module under CentOS 7.2 PowerShell

Source: Internet
Author: User

Currently the Linux version of PowerShell is still alpha version, so many features are not available.

For example, through the PowerShell command: Install-module azurerm to install Azure module online. However, we can implement the installation of Azure components in a flexible way:

1. Install PowerShell as described earlier, or install it with Yum after downloading the RPM installation package:

Yum install ./powershell-6.0. 0_alpha. 9-1. el7.centos.x86_64.rpm

2. After the installation is complete, create the installation directory for the PowerShell Moudle:

mkdir -p/usr/local/share/powershell/modules

3. Enter the PowerShell environment:

PowerShell

4. Install the Azure package:

Install-package-name Azurerm.netcore.preview-source Https://www.powershellgallery.com/api/v2-ProviderName NuGet- Excludeversion-destination/usr/local/share/powershell/modules

5. Import Azure Package:

Import-module AzureRM.NetCore.Preview

You can sign in with Azure commands below, and manage Azure:

Login-azurermaccount-environmentname Azurechinacloud V Erbose:to Signinch, use a Web browser to open the page https://aka.ms/Deviceloginchina. Enter the code XXXXXXXX to authenticate.

Open your browser on your PC, access links and code, and authenticate users. The following information appears after authentication: Environment:AzureChinaCloudAccount:admin@Xxxx.partner.onmschina.cnTenantId:xxxxSubscriptionId:xxxxSubscriptionName:weiheng1Curre Ntstorageaccount:
Get Azure's ResourceGroup information via the PowerShell command:
Get-Azurermresourcegroup

Resourcegroupname:Default-NetworkingLocation:chinaeastProvisioningState:SucceededTags:ResourceId:/subscriptions/xxxx/resourcegroups/Default-networking

Installing Azure Module under CentOS 7.2 PowerShell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.