Skip to content

VMSS Powershell script #850

Closed
Closed
@mimasis

Description

@mimasis

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 200 Keys:

 e Space m y V m s s N e t C o n f i g $ i Space ` Enter
 Space Space Space Space - P r i m a r y Space $ t r u e Space ` Enter
 Space Space Space Space - I P C o n f i g u r a t i o n Space $ i p C o n f i g Enter
 Enter
 Space Space N e w - A z u r e R m V m s s Space ` Enter
 Space Space Space Space - R e s o u r c e G r o u p N a m e Space m y R e s o u r c e G r o u p A G Space ` Enter
 Space Space Space Space - N a m e Space m y v m s s $ i Space ` Enter
 Space Space Space Space - V i r t u a l M a c h i n e S c a l e S e t Space $ v m s s C o n f i g Enter
 }

Exception:

System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -34.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Azure:/
PS Azure:> for ($i=1; $i -le 3; $i++)

{
if ($i -eq 1)
{
$poolId = $backendPool.Id
}
if ($i -eq 2)
{
$poolId = $imagesPool.Id
}
if ($i -eq 3)
{
$poolId = $videoPool.Id
}

$ipConfig = New-AzureRmVmssIpConfig -Name myVmssIPConfig$i
-SubnetId $vnet.Subnets[1].Id `
-ApplicationGatewayBackendAddressPoolsId $poolId

$vmssConfig = New-AzureRmVmssConfig -Location eastus
-SkuCapacity 2 -SkuName Standard_B2s
-UpgradePolicyMode Automatic

Set-AzureRmVmssStorageProfile $vmssConfig -ImageReferencePublisher MicrosoftWindowsServer
-ImageReferenceOffer WindowsServer -ImageReferenceSku 2016-Datacenter
-ImageReferenceVersion latest `
-OsDiskCreateOption FromImage

Set-AzureRmVmssOsProfile $vmssConfig -AdminUsername azureadmin
-AdminPassword "Mundialdeclubes2005" `
-ComputerNamePrefix myvmss$i

Add-AzureRmVmssNetworkInterfaceConfiguration -VirtualMachineScaleSet $vmssConfig
-Name myVmssNetConfig$i -Primary $true
-IPConfiguration $ipConfig

New-AzureRmVmss -ResourceGroupName myResourceGroupAG
-Name myvmss$i `
-VirtualMachineScaleSet $vmssConfig
}
https://docs.microsoft.com/en-us/azure/application-gateway/tutorial-url-redirect-powershell#create-virtual-machine-scale-sets

Metadata

Metadata

Assignees

No one assigned

    Labels

    OutOfRangeIssues relating to System.ArgumentOutOfRangeException

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions