Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a5db7f1
Add new parameter and generate help docs
audreyttt Oct 20, 2025
952f89a
Add tests for creating vmss and vmss config with HighSpeedInterconnec…
audreyttt Oct 24, 2025
2f1972b
Add new parameter option and update test
audreyttt Nov 3, 2025
d3a2dce
Define PowerShell Pull Request Agent with guidelines
audreyttt Nov 20, 2025
4027c18
Rename my-agent.agent.md to ps-cmdlet.agent.md
audreyttt Nov 20, 2025
4439dd0
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 1, 2025
e7364fd
Revert "Rename my-agent.agent.md to ps-cmdlet.agent.md"
audreyttt Dec 1, 2025
94e5b2b
Revert "Define PowerShell Pull Request Agent with guidelines"
audreyttt Dec 1, 2025
22a973e
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 4, 2025
ccabe8d
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 11, 2025
4c6a1f1
Remove string null option
audreyttt Dec 17, 2025
5b909b6
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 17, 2025
3e7b8a7
Merge branch 'main' into audreyt/highSpeedInterconnectPlacement-
audreyttt Dec 18, 2025
681fcef
Update help and changelog
audreyttt Dec 18, 2025
9711b9c
update help docs
audreyttt Dec 18, 2025
7263b1a
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 23, 2025
8548ca6
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 25, 2025
da28210
Merge branch 'main' into audreyt/highSpeedInterconnectPlacement-
audreyttt Dec 25, 2025
1935911
Remove update
audreyttt Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void TestVirtualMachineScaleSetNewEncryptionAtHost()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetEncryptionAtHost");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetOrchestrationVM()
Expand Down Expand Up @@ -220,14 +220,14 @@ public void TestVirtualMachineScaleSetFlexibleOModeDefaulting()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetFlexibleOModeDefaulting");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAddAzVmssRunCommand()
{
TestRunner.RunTestScript("Test-AddAndRemoveAzVmssRunCommand");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetUserdata()
Expand Down Expand Up @@ -318,7 +318,7 @@ public void TestVirtualMachineScaleSetOSImageScheduledEvents()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetOSImageScheduledEvents");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetGetById()
Expand Down Expand Up @@ -374,7 +374,7 @@ public void TestVirtualMachineScaleSetSecurityTypeUpdate()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetSecurityTypeUpdate");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetDefaultToFlexibleOrchestrationMode()
Expand Down Expand Up @@ -409,7 +409,7 @@ public void TestVirtualMachineScaleSetSecurityTypeAndFlexDefaults()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetSecurityTypeAndFlexDefaults");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetSecurityTypeNoVMProfile()
Expand Down Expand Up @@ -507,5 +507,12 @@ public void TestVirtualMachineScaleSetAutomaticZonePlacement()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetAutomaticZonePlacement");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetHighSpeedInterconnectPlacement()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetHighSpeedInterconnectPlacement");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6270,4 +6270,79 @@ function Test-VirtualMachineScaleSetAutomaticZonePlacement
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test creating a VMSS with HighSpeedInterconnectPlacement set
#>
function Test-VirtualMachineScaleSetHighSpeedInterconnectPlacement
{
# Setup
$rgname = Get-ComputeTestResourceName;
$loc = "westus2";

try
{
# Common
New-AzResourceGroup -Name $rgname -Location $loc -Force;

$vmssName = 'vmss' + $rgname;
$domainNameLabel1 = "d1" + $rgname;
$subnetName = 'subnet' + $rgname;
$vnetName = 'vnet' + $rgname;

$adminUsername = Get-ComputeTestResourceName;
$password = Get-PasswordForVM;
$adminPassword = $password | ConvertTo-SecureString -AsPlainText -Force;
$cred = New-Object System.Management.Automation.PSCredential ($adminUsername, $adminPassword);
$linuxImage = "Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest"

# Case 1: Create using simple parameter set
$vmss = New-AzVmss -ResourceGroupName $rgname -Location $loc -Credential `
$cred -VMScaleSetName $vmssName -DomainNameLabel $domainNameLabel1 `
-Image $linuxImage `
-HighSpeedInterconnectPlacement "None";

# verify
Assert-AreEqual $vmss.HighSpeedInterconnectPlacement "None";


# Create VNet and Subnet
$vnetAddressPrefix = "10.0.0.0/16";
$subnetAddressPrefix = "10.0.0.0/24";
$subnetConfig = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix $subnetAddressPrefix;
$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $loc -AddressPrefix $vnetAddressPrefix -Subnet $subnetConfig;

# Get subnet object
$subnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname | Get-AzVirtualNetworkSubnetConfig -Name $subnetName

# VMSS Config
$vmssConfig = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName "Standard_D4s_v3" -HighSpeedInterconnectPlacement "None";

# Configure IP and NIC
$ipCfg = New-AzVmssIpConfig -Name "ipconfig1" -SubnetId $subnet.Id
$vmssConfig = Add-AzVmssNetworkInterfaceConfiguration -VirtualMachineScaleSet $vmssConfig `
-Name "nicConfig" -Primary $true -IPConfiguration $ipCfg;

# Configure OS profile
$vmssConfig = Set-AzVmssOSProfile -VirtualMachineScaleSet $vmssConfig `
-ComputerNamePrefix "test" `
-AdminUsername $adminUsername `
-AdminPassword $password

# Assert the HighSpeedInterconnectPlacement from the vmssConfig
Assert-AreEqual $vmssConfig.HighSpeedInterconnectPlacement "None";

# Create the vmss using the config
$vmssResult = New-AzVmss -ResourceGroupName $rgname -VMScaleSetName "newtestVmss" -VirtualMachineScaleSet $vmssConfig;

# Assert the HighSpeedInterconnectPlacement from the vmssResult
Assert-AreEqual $vmssResult.HighSpeedInterconnectPlacement "None";
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname;
}
}

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

-->
## Upcoming Release
* Added `-HighSpeedInterconnectPlacement` parameter to `New-AzVmssConfig`, `New-AzVmss`, and `Update-AzVmss` cmdlets.
* Added new parameters `ZonePlacementPolicy`, `IncludeZone`, `ExcludeZone`, `MaxZoneCount`, `EnableMaxInstancePercentPerZone` and `MaxInstancePercentPerZoneValue` to `New-AzVmssConfig` cmdlet.
* Added new parameters `ZonePlacementPolicy`, `IncludeZone` and `ExcludeZone` to `New-AzVmss` cmdlet.
* Added new parameters `MaxZoneCount`, `EnableMaxInstancePercentPerZone` and `MaxInstancePercentPerZoneValue` to `Update-AzVmss` cmdlet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ public string ResourceGroupName
// api-version: 2022-03-01.
public DateTime? TimeCreated { get; private set; }
public string Etag { get; private set; }

public ResiliencyPolicy ResiliencyPolicy { get; set; }

public Placement Placement { get; set; }
public string HighSpeedInterconnectPlacement { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@ public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.Reso
[ValidateNotNullOrEmpty]
public string[] ExcludeZone { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies the high speed interconnect placement for the virtual machine scale set.")]
[PSArgumentCompleter("None", "Trunk")]
public string HighSpeedInterconnectPlacement { get; set; }

protected override void ProcessRecord()
{
if (ShouldProcess("VirtualMachineScaleSet", "New"))
Expand Down Expand Up @@ -1248,7 +1255,8 @@ private void Run()
PriorityMixPolicy = vPriorityMixPolicy,
SkuProfile = vSkuProfile,
ResiliencyPolicy = vResiliencyPolicy,
Placement = vPlacement
Placement = vPlacement,
HighSpeedInterconnectPlacement = this.IsParameterBound(c => c.HighSpeedInterconnectPlacement) ? this.HighSpeedInterconnectPlacement : null
};

WriteObject(vVirtualMachineScaleSet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ public partial class NewAzureRmVmss : ComputeAutomationBaseCmdlet
[ValidateNotNullOrEmpty]
public string[] ExcludeZone { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies the high speed interconnect placement for the virtual machine scale set.")]
[PSArgumentCompleter("None", "Trunk")]
public string HighSpeedInterconnectPlacement { get; set; }

private void ConfigureSecuritySettings()
{
if (SecurityType?.ToLower() == SecurityTypes.TrustedLaunch ||
Expand Down Expand Up @@ -585,7 +592,8 @@ private async Task<ResourceConfig<VirtualMachineScaleSet>> SimpleParameterSetNor
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null,
zonePlacementPolicy: _cmdlet.ZonePlacementPolicy,
includeZone: _cmdlet.IncludeZone,
excludeZone: _cmdlet.ExcludeZone
excludeZone: _cmdlet.ExcludeZone,
highSpeedInterconnectPlacement: _cmdlet.IsParameterBound(c => c.HighSpeedInterconnectPlacement) ? _cmdlet.HighSpeedInterconnectPlacement : null
);
}

Expand Down Expand Up @@ -729,7 +737,8 @@ private async Task<ResourceConfig<VirtualMachineScaleSet>> SimpleParameterSetOrc
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null,
zonePlacementPolicy: _cmdlet.ZonePlacementPolicy,
includeZone: _cmdlet.IncludeZone,
excludeZone: _cmdlet.ExcludeZone
excludeZone: _cmdlet.ExcludeZone,
highSpeedInterconnectPlacement: _cmdlet.IsParameterBound(c => c.HighSpeedInterconnectPlacement) ? _cmdlet.HighSpeedInterconnectPlacement : null
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
bool? addProxyAgentExtension = null,
string zonePlacementPolicy = null,
string[] includeZone = null,
string[] excludeZone = null
string[] excludeZone = null,
string highSpeedInterconnectPlacement = null
)
=> Strategy.CreateResourceConfig(
resourceGroup: resourceGroup,
Expand Down Expand Up @@ -210,7 +211,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
ZonePlacementPolicy = zonePlacementPolicy,
IncludeZones = includeZone,
ExcludeZones = excludeZone
} : null
} : null,
HighSpeedInterconnectPlacement = highSpeedInterconnectPlacement
};
if (auxAuthHeader != null)
{
Expand Down Expand Up @@ -266,7 +268,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
bool? addProxyAgentExtension = null,
string zonePlacementPolicy = null,
string[] includeZone = null,
string[] excludeZone = null
string[] excludeZone = null,
string highSpeedInterconnectPlacement = null
)
=> Strategy.CreateResourceConfig(
resourceGroup: resourceGroup,
Expand Down Expand Up @@ -371,7 +374,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
ZonePlacementPolicy = zonePlacementPolicy,
IncludeZones = includeZone,
ExcludeZones = excludeZone
} : null
} : null,
HighSpeedInterconnectPlacement = highSpeedInterconnectPlacement
};
if (auxAuthHeader != null)
{
Expand Down
24 changes: 20 additions & 4 deletions src/Compute/Compute/help/New-AzVmss.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Creates a virtual machine scale set.
```
New-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
[-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [-AsJob] [-IfMatch <String>] [-IfNoneMatch <String>]
[-EdgeZone <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-EdgeZone <String>] [-HighSpeedInterconnectPlacement <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

### SimpleParameterSet
Expand All @@ -41,8 +41,8 @@ New-AzVmss [[-ResourceGroupName] <String>] [-VMScaleSetName] <String> [-AsJob] [
[-SecurityPostureExcludeExtension <String[]>] [-SkuProfileVmSize <String[]>]
[-SkuProfileAllocationStrategy <String>] [-EnableProxyAgent] [-AddProxyAgentExtension]
[-ZonePlacementPolicy <String>] [-IncludeZone <String[]>] [-ExcludeZone <String[]>]
[-DefaultProfile <IAzureContextContainer>] [-SinglePlacementGroup] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-HighSpeedInterconnectPlacement <String>] [-DefaultProfile <IAzureContextContainer>]
[-SinglePlacementGroup] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -619,6 +619,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -HighSpeedInterconnectPlacement
Specifies the high speed interconnect placement for the virtual machine scale set.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: None, Trunk

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -HostGroupId
Specifies the dedicated host group the virtual machine scale set will reside in.

Expand Down
24 changes: 20 additions & 4 deletions src/Compute/Compute/help/New-AzVmssConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [-EdgeZone
[-EnableResilientVMDelete] [-EnableAutomaticZoneRebalance] [-AutomaticZoneRebalanceStrategy <String>]
[-AutomaticZoneRebalanceBehavior <String>] [-ZonePlacementPolicy <String>] [-MaxZoneCount <Int32>]
[-EnableMaxInstancePercentPerZone] [-MaxInstancePercentPerZoneValue <Int32>] [-IncludeZone <String[]>]
[-ExcludeZone <String[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
[-ExcludeZone <String[]>] [-HighSpeedInterconnectPlacement <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

### ExplicitIdentityParameterSet
Expand Down Expand Up @@ -66,8 +66,8 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [-EdgeZone
[-EnableResilientVMDelete] [-EnableAutomaticZoneRebalance] [-AutomaticZoneRebalanceStrategy <String>]
[-AutomaticZoneRebalanceBehavior <String>] [-ZonePlacementPolicy <String>] [-MaxZoneCount <Int32>]
[-EnableMaxInstancePercentPerZone] [-MaxInstancePercentPerZoneValue <Int32>] [-IncludeZone <String[]>]
[-ExcludeZone <String[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
[-ExcludeZone <String[]>] [-HighSpeedInterconnectPlacement <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -621,6 +621,22 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -HighSpeedInterconnectPlacement
Specifies the high speed interconnect placement for the virtual machine scale set.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: None, Trunk

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -IdentityId
Specifies the list of user identities associated with the virtual machine scale set.
The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'
Expand Down
20 changes: 18 additions & 2 deletions src/Compute/Compute/help/Update-AzVmss.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
[-EnableResilientVMDelete <Boolean>] [-EnableAutomaticZoneRebalance <Boolean>]
[-AutomaticZoneRebalanceStrategy <String>] [-AutomaticZoneRebalanceBehavior <String>]
[-MaxZoneCount <Int32>] [-EnableMaxInstancePercentPerZone <Boolean>]
[-MaxInstancePercentPerZoneValue <Int32>]
[-MaxInstancePercentPerZoneValue <Int32>] [-HighSpeedInterconnectPlacement <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -72,7 +72,7 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
[-EnableResilientVMDelete <Boolean>] [-EnableAutomaticZoneRebalance <Boolean>]
[-AutomaticZoneRebalanceStrategy <String>] [-AutomaticZoneRebalanceBehavior <String>]
[-MaxZoneCount <Int32>] [-EnableMaxInstancePercentPerZone <Boolean>]
[-MaxInstancePercentPerZoneValue <Int32>]
[-MaxInstancePercentPerZoneValue <Int32>] [-HighSpeedInterconnectPlacement <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -450,6 +450,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -HighSpeedInterconnectPlacement
Specifies the high speed interconnect placement for the virtual machine scale set.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: None, Trunk

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -IdentityId
Specifies the list of user identities associated with the virtual machine scale set.
The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'
Expand Down