Skip to content

Commit 142caec

Browse files
author
Anavi Nahar
committed
Adding missing examples
1 parent e60fe3f commit 142caec

File tree

1 file changed

+134
-3
lines changed

1 file changed

+134
-3
lines changed

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-Help.xml

Lines changed: 134 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15281,6 +15281,28 @@ PS C:\> Get-AzureRmLoadBalancerRuleConfig -Name "MyLBrulename" -Loa
1528115281
</maml:alert>
1528215282
</maml:alertSet>
1528315283
<command:examples>
15284+
<command:example>
15285+
<maml:title>-------------------------- Example 1 Get an IP configuration of a network interface --------------------------</maml:title>
15286+
<maml:introduction>
15287+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
15288+
</maml:introduction>
15289+
<dev:code>PS C:\&gt; $nic1 = Get-AzureRmNetworkInterface -Name mynic -ResourceGroupName $myrg
15290+
15291+
PS C:\&gt; Get-AzureRmNetworkInterfaceIpConfig -Name ipconfig1 -NetworkInterface $nic1</dev:code>
15292+
<dev:remarks>
15293+
<maml:para>The first command gets an existing network interface called mynic and stores it in the variable $nic1. The second command gets the IP configuration called ipconfig1 of this network interface.</maml:para>
15294+
<maml:para />
15295+
<maml:para />
15296+
<maml:para></maml:para>
15297+
</dev:remarks>
15298+
<command:commandLines>
15299+
<command:commandLine>
15300+
<command:commandText>
15301+
<maml:para />
15302+
</command:commandText>
15303+
</command:commandLine>
15304+
</command:commandLines>
15305+
</command:example>
1528415306
</command:examples>
1528515307
<maml:relatedLinks>
1528615308
</maml:relatedLinks>
@@ -27738,6 +27760,61 @@ New-AzureRmNetworkInterface -Name NetworkInterface1 -ResourceGroupName ResourceG
2773827760
</maml:alert>
2773927761
</maml:alertSet>
2774027762
<command:examples>
27763+
<command:example>
27764+
<maml:title>-------------------------- Example 1 Create an IP configuration with a public IP address for a network interface --------------------------</maml:title>
27765+
<maml:introduction>
27766+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
27767+
</maml:introduction>
27768+
<dev:code>PS C:\&gt; $vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
27769+
PS C:\&gt; $Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
27770+
PS C:\&gt; $PIP1 = Get-AzureRmPublicIPAddress -Name &quot;PIP1&quot; -ResourceGroupName &quot;RG1&quot;
27771+
27772+
PS C:\&gt; $IPConfig1 = New-AzureRmNetworkInterfaceIpConfig -Name &quot;IPConfig-1&quot; -Subnet $Subnet -PublicIpAddress $PIP1 -Primary
27773+
27774+
PS C:\&gt; $nic = New-AzureRmNetworkInterface -Name $NicName -ResourceGroupName myrg -Location westus -IpConfiguration $IpConfig1
27775+
</dev:code>
27776+
<dev:remarks>
27777+
<maml:para>The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are stored in $vnet and $Subnet respectively. The third command gets a previously created public IP address called PIP1. The forth command creates a new IP configuration called &quot;IPConfig-1&quot; as the primary IP configuration with a public IP address associated with it.
27778+
The last command then creates a network interface called mynic1 using this IP configuration.</maml:para>
27779+
<maml:para />
27780+
<maml:para />
27781+
<maml:para></maml:para>
27782+
</dev:remarks>
27783+
<command:commandLines>
27784+
<command:commandLine>
27785+
<command:commandText>
27786+
<maml:para />
27787+
</command:commandText>
27788+
</command:commandLine>
27789+
</command:commandLines>
27790+
</command:example>
27791+
<command:example>
27792+
<maml:title>-------------------------- Example 2 Create an IP configuration with a private IP address --------------------------</maml:title>
27793+
<maml:introduction>
27794+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
27795+
</maml:introduction>
27796+
<dev:code>PS C:\&gt; $vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
27797+
PS C:\&gt; $Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
27798+
27799+
27800+
PS C:\&gt; $IPConfig2 = New-AzureRmNetworkInterfaceIpConfig -Name &quot;IP-Config2&quot; -Subnet $Subnet -PrivateIpAddress 10.0.0.5
27801+
27802+
PS C:\&gt; $nic = New-AzureRmNetworkInterface -Name mynic1 -ResourceGroupName myrg -Location westus -IpConfiguration $IpConfig2</dev:code>
27803+
<dev:remarks>
27804+
<maml:para>The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are stored in $vnet and $Subnet respectively. The third command creates a new IP configuration called &quot;IPConfig-2&quot; with a private IP address 10.0.0.5 associated with it.
27805+
The last command then creates a network interface called mynic1 using this IP configuration.</maml:para>
27806+
<maml:para />
27807+
<maml:para />
27808+
<maml:para></maml:para>
27809+
</dev:remarks>
27810+
<command:commandLines>
27811+
<command:commandLine>
27812+
<command:commandText>
27813+
<maml:para />
27814+
</command:commandText>
27815+
</command:commandLine>
27816+
</command:commandLines>
27817+
</command:example>
2774127818
</command:examples>
2774227819
<maml:relatedLinks>
2774327820
</maml:relatedLinks>
@@ -35729,13 +35806,15 @@ InboundNatPools : []</maml:para>
3572935806
</maml:alertSet>
3573035807
<command:examples>
3573135808
<command:example>
35732-
<maml:title>-------------------------- 1: --------------------------</maml:title>
35809+
<maml:title>-------------------------- 1: Delete an inbound NAT rule from an Azure load balancer --------------------------</maml:title>
3573335810
<maml:introduction>
3573435811
<maml:paragraph>PS C:\&gt;</maml:paragraph>
3573535812
</maml:introduction>
35736-
<dev:code></dev:code>
35813+
<dev:code>PS C:\&gt; $loadbalancer = Get-AzureRmLoadBalancer -Name mylb -ResourceGroupName myrg
35814+
35815+
PS C:\&gt; Remove-AzureRmLoadBalancerInboundNatPoolConfig -Name &quot;myinboundnatrule&quot; -LoadBalancer $loadbalancer</dev:code>
3573735816
<dev:remarks>
35738-
<maml:para />
35817+
<maml:para>The first command loads an already existing load balancer called &quot;mylb&quot; and stores it in the variable $load balancer. The second command removes the inbound NAT rule associated with this load balancer.</maml:para>
3573935818
<maml:para />
3574035819
<maml:para />
3574135820
<maml:para></maml:para>
@@ -36807,6 +36886,28 @@ PS C:&gt; Remove-AzureRmLoadBalancerRuleConfig -Name &quot;MyLBruleName&quot; -
3680736886
</maml:alert>
3680836887
</maml:alertSet>
3680936888
<command:examples>
36889+
<command:example>
36890+
<maml:title>-------------------------- Example 1 Delete an IP configuration from a network interface --------------------------</maml:title>
36891+
<maml:introduction>
36892+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
36893+
</maml:introduction>
36894+
<dev:code>PS C:\&gt; $nic = Get-AzureRmNetworkInterface -Name mynic -ResourceGroupName myrg
36895+
36896+
PS C:\&gt; Remove-AzureRmNetworkInterfaceIpConfig -Name IPConfig-1 -NetworkInterface $nic</dev:code>
36897+
<dev:remarks>
36898+
<maml:para>The first command gets a network interface called mynic and stores it in the variable $nic. The second command removes the IP configuration called IPConfig-1 associated with this network interface.</maml:para>
36899+
<maml:para />
36900+
<maml:para />
36901+
<maml:para></maml:para>
36902+
</dev:remarks>
36903+
<command:commandLines>
36904+
<command:commandLine>
36905+
<command:commandText>
36906+
<maml:para />
36907+
</command:commandText>
36908+
</command:commandLine>
36909+
</command:commandLines>
36910+
</command:example>
3681036911
</command:examples>
3681136912
<maml:relatedLinks>
3681236913
</maml:relatedLinks>
@@ -47807,6 +47908,36 @@ Set-AzureRmNetworkInterface -NetworkInterface $nic</dev:code>
4780747908
</maml:alert>
4780847909
</maml:alertSet>
4780947910
<command:examples>
47911+
<command:example>
47912+
<maml:title>-------------------------- Example 1 Changing the IP address of an IP configuration --------------------------</maml:title>
47913+
<maml:introduction>
47914+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
47915+
</maml:introduction>
47916+
<dev:code>PS C:\&gt; $vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
47917+
PS C:\&gt; $subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
47918+
47919+
PS C:\&gt; $nic = Get-AzureRmNetworkInterface -Name nic1 -ResourceGroupName myrg
47920+
47921+
PS C:\&gt; $nic | Set-AzureRmNetworkInterfaceIpConfig -Name ipconfig1 -PrivateIpAddress 10.0.0.11 -Subnet $subnet -Primary
47922+
47923+
PS C:\&gt; $nic | Set-AzureRmNetworkInterface
47924+
47925+
47926+
</dev:code>
47927+
<dev:remarks>
47928+
<maml:para>The first two commands get a virtual network called myvnet and a subnet called mysubnet and store it in the variables $vnet and $subnet respectively. The third command gets the network interface nic1 associated with the IP configuration that needs to be updated. The third command sets the private IP address of the primary IP configuration ipconfig1 to 10.0.0.11. Finally, the last command updates the network interface ensuring the changes have been made successfully.</maml:para>
47929+
<maml:para />
47930+
<maml:para />
47931+
<maml:para></maml:para>
47932+
</dev:remarks>
47933+
<command:commandLines>
47934+
<command:commandLine>
47935+
<command:commandText>
47936+
<maml:para />
47937+
</command:commandText>
47938+
</command:commandLine>
47939+
</command:commandLines>
47940+
</command:example>
4781047941
</command:examples>
4781147942
<maml:relatedLinks>
4781247943
</maml:relatedLinks>

0 commit comments

Comments
 (0)