zoukankan      html  css  js  c++  java
  • [Azure][PowerShell][ASM][10]Endpoint

    $mySubscriptionName=""
    Select-AzureSubscription -SubscriptionName $mySubscriptionName

    $myServiceName = ""
    $myVMName = ""

    $myNewVMEndpoints =
    ("endpointname","tcp","8005","8005"),
    ("endpointname","tcp","8000","8000")

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

    foreach ($myEndpointConfig in $myNewVMEndpoints)
    {
    $myVM | Add-AzureEndpoint -Name $myEndpointConfig[0] -Protocol $myEndpointConfig[1] -PublicPort $myEndpointConfig[2] -LocalPort $myEndpointConfig[3]
    }

    $myVM | Update-AzureVM

    # 批量导入

    Import-Csv '<CSVFilePath>' | foreach {Get-AzureVM -ServiceName $_.ServiceName -Name $_.VMname | Add-AzureEndpoint -Protocol $_.Protocol -LocalPort $_.LocalPort -PublicPort $_.PublicPort -Name $_.PortName | Update-AzureVM}

    Import-Csv '<CSVFilePath>' | foreach {Get-AzureVM -ServiceName $_.ServiceName -Name $_.VMname | Add-AzureEndpoint -Protocol $_.Protocol -LocalPort $_.LocalPort -PublicPort $_.PublicPort -Name $_.PortName -ProbePort $_.ProbePort -ProbeProtocol $_.ProbeProtocol -LBSetName $_.LBSetName -ProbePath $_.ProbePath| Update-AzureVM}

  • 相关阅读:
    C#带日期型默认值参数的函数
    mvc调用webapi上传图片或文件
    mysql增删改查存储过程
    sql 分页存储过程
    sql 出库存储过程
    Ternura
    留言板
    友链
    .net 死锁
    C#微信小程序搜索框
  • 原文地址:https://www.cnblogs.com/wuzhenzhou/p/6909631.html
Copyright © 2011-2022 走看看