Azure / Azure/azure-powershell

New-AzIpsecPolicy is missing IkeEncryption optioion that is available in the portal

Open
#28,945 3 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad customer-reported feature-request Network Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

When using New-AzIpsecPolicy with -IkeEncryption does not allow all values that are reflected in the Azure Portal.

Allowed values in Azure Portal:
IKE Phase 1: AES128, AES192, AES256, GCMAES128, GCMAES256
IKE Phase 2: DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256

Allowed values in powershell module:
IKE Phase 1: DES, DES3, AES128, AES192, AES256
IKE Phase 2: None, DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256

As you can see, its missing some options. Can these be added to allow wanted creation?

### Script or Debug output

```PowerShell
$ipsecPolicy = New-AzIpsecPolicy `
-DhGroup "DHGroup24" `
-IkeEncryption "GCMAES256" `
-IkeIntegrity "SHA384" `
-IpsecEncryption "GCMAES256" `
-IpsecIntegrity "GCMAES256" `
-PfsGroup "PFS24" `
-SADataSizeKilobytes 102400000 `
-SALifeTimeSeconds 14400
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Aug 11 21:15:09 PDT 2…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 7.23.1 Az.Network {Add-AzApplicationGatewayAuthen…
```

### Error output

```PowerShell
New-AzIpsecPolicy:
Line |
3 | -IkeEncryption "GCMAES256" `
| ~~~~~~~~~~~
| Cannot validate argument on parameter 'IkeEncryption'. The argument "GCMAES256" does not belong to the set "DES,DES3,AES128,AES192,AES256" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
```

Contributor guide

Open the contributing guide

Research direction

Start by locating New-AzIpsecPolicy and the ValidateSet applied to its IkeEncryption parameter. Compare the accepted values with the Azure Portal lists in the issue, then verify that the missing encryption options are accepted while unsupported values remain rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.