@@ -27,7 +27,7 @@ The first step is to make sure you have the latest version of the Azure PowerShe
27
27
command line.
28
28
29
29
You should see the version number of the AzureRM module installed and loaded in your PowerShell
30
- session.
30
+ session. The latest version is can be found in the [ release notes ] ( release-notes-azureps.md ) .
31
31
32
32
## Log in to Azure
33
33
@@ -91,9 +91,9 @@ $vnet = New-AzureRmVirtualNetwork -ResourceGroupName $resourceGroup -Location $l
91
91
-Name MYvNET1 -AddressPrefix 192.168.0.0/16 -Subnet $subnetConfig
92
92
93
93
# Create a public IP address and specify a DNS name
94
- $pip = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Location $location `
94
+ $publicIp = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Location $location `
95
95
-Name "mypublicdns$(Get-Random)" -AllocationMethod Static -IdleTimeoutInMinutes 4
96
- $pip | Select-Object Name,IpAddress
96
+ $publicIp | Select-Object Name,IpAddress
97
97
98
98
# Create an inbound network security group rule for port 3389
99
99
$nsgRuleRDP = New-AzureRmNetworkSecurityRuleConfig -Name myNetworkSecurityGroupRuleRDP -Protocol Tcp `
@@ -106,7 +106,7 @@ $nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroup -Locati
106
106
107
107
# Create a virtual network card and associate with public IP address and NSG
108
108
$nic = New-AzureRmNetworkInterface -Name myNic1 -ResourceGroupName $resourceGroup -Location $location `
109
- -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip .Id -NetworkSecurityGroupId $nsg.Id
109
+ -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $publicIp .Id -NetworkSecurityGroupId $nsg.Id
110
110
```
111
111
112
112
### Create the virtual machine
@@ -144,7 +144,7 @@ Now log on to your newly created Windows Server VM using Remote Desktop and the
144
144
of the VM. The following command displays the public IP address created in the previous script.
145
145
146
146
``` powershell
147
- $pip | Select-Object Name,IpAddress
147
+ $publicIp | Select-Object Name,IpAddress
148
148
```
149
149
150
150
```
@@ -195,9 +195,9 @@ $vnet = New-AzureRmVirtualNetwork -ResourceGroupName $resourceGroup -Location $l
195
195
-Name MYvNET2 -AddressPrefix 192.168.0.0/16 -Subnet $subnetConfig
196
196
197
197
# Create a public IP address and specify a DNS name
198
- $pip = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Location $location `
198
+ $publicIp = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Location $location `
199
199
-Name "mypublicdns$(Get-Random)" -AllocationMethod Static -IdleTimeoutInMinutes 4
200
- $pip | Select-Object Name,IpAddress
200
+ $publicIp | Select-Object Name,IpAddress
201
201
202
202
# Create an inbound network security group rule for port 22
203
203
$nsgRuleSSH = New-AzureRmNetworkSecurityRuleConfig -Name myNetworkSecurityGroupRuleSSH -Protocol Tcp `
@@ -210,7 +210,7 @@ $nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroup -Locati
210
210
211
211
# Create a virtual network card and associate with public IP address and NSG
212
212
$nic = New-AzureRmNetworkInterface -Name myNic2 -ResourceGroupName $resourceGroup -Location $location `
213
- -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip .Id -NetworkSecurityGroupId $nsg.Id
213
+ -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $publicIp .Id -NetworkSecurityGroupId $nsg.Id
214
214
```
215
215
216
216
### Create the virtual machine
0 commit comments