$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 “"