[Azure][PowerShell][ASM][11]ILB

$mySubscriptionName=""

Select-AzureSubscription -SubscriptionName $mySubscriptionName 

$myServiceName=""

$myInternalLoadBalancerName=""

$mySubnetName=""  

$myStaticVNetIPAddress=""

Add-AzureInternalLoadBalancer  -ServiceName  $myServiceName  -InternalLoadBalancerName  $myInternalLoadBalancerName  –SubnetName  $mySubnetName  –StaticVNetIPAddress  $myStaticVNetIPAddress

 

$myProtocal="TCP"

$myLocalPort=“"

$myPublicPort=“"

$myEndPointName=""

#$myLbSetName=""

 

$myVMName=""

$myVM = Get-AzureVM  –ServiceName  $myServiceName  –Name  $myVMName

$myVM | Add-AzureEndpoint  -Name  $myEndpointName  -LbSetName  $myLbSetName  -Protocol  $myProtocal  -LocalPort  $myLocalPort  -PublicPort  $myPublicPort  –DefaultProbe  -InternalLoadBalancerName  $myInternalLoadBalancerName   |  Update-AzureVM

 

$myServices = Get-AzureService

foreach ($myService in $myServices)

{

Get-AzureInternalLoadBalancer -ServiceName $myService.ServiceName

 

# 示例

get-AzureInternalLoadBalancer  -ServiceName “"

get-azurevm -ServiceName SOM-BJ-SQL -Name “" | Get-AzureEndpoint 

 

get-azurevm -ServiceName SOM-BJ-SQL -Name “" | Remove-AzureEndpoint -Name ListenerEndpoint | update-azurevm

get-azurevm -ServiceName SOM-BJ-SQL -Name “" | Remove-AzureEndpoint -Name ListenerEndpoint | update-azurevm

remove-AzureInternalLoadBalancer  -ServiceName “"

posted @ 2017-05-26 17:31  wuzhenzhou  阅读(157)  评论(0编辑  收藏  举报