发布网友 发布时间:2022-04-29 18:51
共2个回答
懂视网 时间:2022-05-01 02:05
( [Parameter(Mandatory=$true)] [String]$subscriptionId ) $flag=0 $subs=Get-AzureSubscription foreach($sub in $subs) { if($sub.subscriptionid -eq $subscriptionId) { $flag=1 } } if($flag -eq 0) { Add-AzureAccount -Environment AzureChinaCloud } Select-AzureSubscription -SubscriptionId $subscriptionId $sers = Get-AzureService $result=@() foreach ($ser in $sers) { $vms = get-azurevm -ServiceName $ser.ServiceName foreach($vm in $vms) { $lbs=Get-AzureEndpoint -VM $vm | Where-Object {$_.LBSetName -ne $null} foreach ($lb in $lbs) { $vmObject = New-Object PSObject $vmObject | Add-Member -MemberType NoteProperty -Name "ServiceName" -Value $vm.ServiceName $vmObject | Add-Member -MemberType NoteProperty -Name "VMName" -Value $vm.Name $vmObject | Add-Member -MemberType NoteProperty -Name "LBType" -Value "SLB" $vmObject | Add-Member -MemberType NoteProperty -Name "SLBName" -Value $lb.LBSetName $vmObject | Add-Member -MemberType NoteProperty -Name "LocalPort" -Value $lb.LocalPort $vmObject | Add-Member -MemberType NoteProperty -Name "PubPort" -Value $lb.Port $vmObject | Add-Member -MemberType NoteProperty -Name "HashType" -Value $lb.LoadBalancerDistribution $result+= $vmObject } $ilbs=Get-AzureEndpoint -VM $vm | Where-Object {$_.InternalLoadBalancerName -ne $null} foreach ($ilb in $ilbs) { $vmObject = New-Object PSObject $vmObject | Add-Member -MemberType NoteProperty -Name "ServiceName" -Value $vm.ServiceName $vmObject | Add-Member -MemberType NoteProperty -Name "VMName" -Value $vm.Name $vmObject | Add-Member -MemberType NoteProperty -Name "LBType" -Value "ILB" $vmObject | Add-Member -MemberType NoteProperty -Name "SLBName" -Value $ilb.InternalLoadBalancerName $vmObject | Add-Member -MemberType NoteProperty -Name "LocalPort" -Value $ilb.LocalPort $vmObject | Add-Member -MemberType NoteProperty -Name "PubPort" -Value $ilb.Port $vmObject | Add-Member -MemberType NoteProperty -Name "HashType" -Value $ilb.LoadBalancerDistribution $result+= $vmObject } } } $result |Format-Table
获得Azure订阅LoadBalancer的脚本
标签:
热心网友 时间:2022-04-30 23:13
dreamspark没发布Win8少数购买dreamspark Premium校才能载win8win8式版win8iso都进行全新安装升级安装升级安装保留win7安装软件软件或者驱与win8兼容性问题建议先卸载该软件再升级安装升级前建议使用升级助手检查兼容性vistaXP即使使用升级安装能保留原应用程序