Skip to content

VMSS Powershell script #850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mimasis opened this issue Jan 31, 2019 · 1 comment
Closed

VMSS Powershell script #850

mimasis opened this issue Jan 31, 2019 · 1 comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@mimasis
Copy link

mimasis commented Jan 31, 2019

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

@daxian-dbw daxian-dbw added this to the 2.0.0-Consider milestone Jun 18, 2019
@joeyaiello joeyaiello added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Jun 18, 2019
@daxian-dbw
Copy link
Member

Fixed by #979 and #967

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException
Projects
None yet
Development

No branches or pull requests

3 participants