Create a virtual machine network using PowerShell

Source: Internet
Author: User

before creating a virtual network using the portal Web, we've covered it in more detail, and the next blog post will be a detailed introduction to creating a virtual network using PowerShell

Open the portal, select Network Options, click the Export button below

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/7C/wKiom1cgSfXjbe8oAACyFYrDsXw804.png "title=" 1.png " alt= "Wkiom1cgsfxjbe8oaacyfyrdsxw804.png"/>

Select subscription information

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/7C/wKiom1cgSf6QAA7gAAAiWWAMS-Q970.png "title=" 2.png " alt= "Wkiom1cgsf6qaa7gaaaiwwams-q970.png"/>

Save an existing network configuration file

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/79/wKioL1cgStHRgndbAAApkNE0y4A746.png "title=" 3.png " alt= "Wkiol1cgsthrgndbaaapkne0y4a746.png"/>

Open a configuration file with Notepad

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/79/wKioL1cgStqxjLcRAABdbC-Br2w440.png "title=" 4.png " alt= "Wkiol1cgstqxjlcraabdbc-br2w440.png"/>

in the network configuration file, we can see the existing virtual network situation, there is a DNS Server, two virtual network networks ,zbvnet

We edit the virtual network configuration file, add a virtual network inside, we can directly copy a <virtualnetworksite> </virtualnetworksite> between the configuration file, Modified to the virtual network we need to add to the configuration file, we have added a virtual networknamed Powershellnetwork, the IP range is 172.30.100.0/24, and there is a 172.30.100.0/27 's subnet

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7F/7C/wKiom1cgShii5v9HAABiFTL5bvM755.png "title=" 5.png " alt= "Wkiom1cgshii5v9haabiftl5bvm755.png"/>

Save the configuration file to open Azure PowerShell

To import a configuration file using the Set-azurevnetconfig command

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/7C/wKiom1cgSiGgcDKbAAAkzmr2oa4573.png "title=" 6.png " alt= "Wkiom1cgsiggcdkbaaakzmr2oa4573.png"/>

Finish creating

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/7C/wKiom1cgSiqzRDSzAAAbUpxF5e4841.png "title=" 7.png " alt= "Wkiom1cgsiqzrdszaaabupxf5e4841.png"/>

we'll take a look at the portal. powershellnetwork Virtual network creation complete

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/7C/wKiom1cgSjKwcC08AAC2n7BPPOM022.png "title=" 8.png " alt= "Wkiom1cgsjkwcc08aac2n7bppom022.png"/>

look at the virtual network the IP case, as we specified.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/7C/wKiom1cgSjqTxTqxAAESL5qBgv8081.png "title=" 9.png " alt= "Wkiom1cgsjqtxtqxaaesl5qbgv8081.png"/>

personally, it is easier to use a portal when creating a small number of virtual networks, and the way in which PowerShell is created when you create a virtual network in bulk.


This article is from the "Stit" blog, make sure to keep this source http://yourcloud.blog.51cto.com/1382814/1768187

Create a virtual machine network using PowerShell

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.