Skip to content

Add Tags and Location parameters to SSH key cmdlets#4

Draft
Copilot wants to merge 54 commits intomainfrom
copilot/review-cmdlets-design-guidelines
Draft

Add Tags and Location parameters to SSH key cmdlets#4
Copilot wants to merge 54 commits intomainfrom
copilot/review-cmdlets-design-guidelines

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 10, 2026

Customer IcM identified missing -Tags and -Location parameters in New-AzSshKey, and -Tags in Update-AzSshKey.

Changes

New-AzSshKey

  • Added -Location parameter (optional, defaults to resource group location)
  • Added -Tags parameter (optional, Hashtable) with -Tag alias for backward compatibility

Update-AzSshKey

  • Added -Tags parameter (optional, Hashtable) with -Tag alias for backward compatibility

Tests

  • Test-SshKeyWithTags: validates tag creation and updates
  • Test-SshKeyWithLocation: validates custom location specification

Documentation

  • Updated parameter references and added usage examples

Usage

# Create with tags and custom location
New-AzSshKey -ResourceGroupName "rg" -Name "key1" `
  -Location "eastus" `
  -Tags @{ Environment = "prod"; Owner = "team" }

# Update tags
Update-AzSshKey -ResourceGroupName "rg" -Name "key1" `
  -PublicKey $key.publicKey `
  -Tags @{ Environment = "staging" }

Implementation Notes

  • Tags parameter named Tags (plural) with Tag alias, matching convention from New-AzVMConfig
  • Tag conversion uses standard pattern: Tags.Cast<DictionaryEntry>().ToDictionary()
  • Location binding checked via IsParameterBound()
  • Follows existing Compute module conventions (see New-AzVMConfig and DedicatedHost cmdlets)
Original prompt

This section details on the original issue you should resolve

<issue_title>{MODULE} - {FEATURE}</issue_title>
<issue_description>

Guidelines

The purpose of the Azure PowerShell design review is to ensure that the cmdlets follow the same pattern across the Azure modules. An early design review reduces the risk of unnecessary implementation changes caused by a cmdlet syntax design change.

Please ensure your cmdlets comply with the design guidelines outlined in the PowerShell Design Guidelines document.

Please generate cmdlets syntax using GenerateCmdletDesignMarkdown.ps1 for review if your cmdlet is generated from API spec directly by Autorest.PowerShell.

If you just add parameter to existing cmdlets and parameter definition complies with guideline, the design review is not expected.

  • Have you read above statement?

    • `Yes

Service Release Details

  • Is this an Embargoed Preview, A Public Preview, or a General Release?

    • General Release
  • What is the expected service release date?

    • 03/03/2026
  • Which Powershell module are these changes being made in?

    • Compute

Contact Information

  • Main developer contacts (emails + github aliases)

    • audreytoney@microsoft.com, Github: audreyttt
  • Other people who should attend a design review (email)

    • Haider Agha @haagha

High Level Scenarios

  • Describe how your feature is intended to be used by customers.

    • `This feature is in response to an IcM raised by a customer. PowerShell is missing flags for the New-AzSshKey command, which should accept the parameters -Tags and -Location during resource creation. -Tags should be included in Update-AzSshKey as well.
  • Piping scenarios / how these cmdlets are used with existing cmdlets

    • New-AzSshKey -ResourceGroupName $rgname -Name "sshkey2" -Tags @{ Name = "testtag"; Value = "testval" }

Syntax changes

Indicate if you are requesting an edit to existing cmdlets, adding new cmdlets, or both. Then edit the corresponding section below.

- { Existing}

Changed cmdlet

List the names of the cmdlets that are being edited.

- {New-AzSshKey, Update-AzSshKey}

List the new parameters for the cmdlet, the parameter types, and their allowed values if applicable.

- {New parameters: -Tags <Hashtable> for New-AzSshKey, Update-AzSshKey. -Location <String> for New-AzSshKey only}

Please describe the new business logic of the cmdlet and parameters here.

- {Tags and Location parameters are being added }

Link to diff between markdown help files, or sample syntax as above.

Indicate which parameter sets on the cmdlet are affected by this change.

- { These values should be added to all parameter sets}

</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: Compute PowerShell Pull Request Agent
Specialized agent for creating PowerShell pull requests based on a design request

  • Fixes Azure/azure-powershell-cmdlet-review-pr#1535

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

yifanz7 and others added 27 commits January 26, 2026 13:06
Co-authored-by: Haider Agha <64601174+haagha@users.noreply.github.com>
Co-authored-by: PSCmdAssistant <165698868+PSCmdAssistant@users.noreply.github.com>
Co-authored-by: audreyttt <audreytoney@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Janiel Martell Colon <janielm@microsoft.com>
Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
Co-authored-by: Janiel Martell Colon <janielm@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…zure#29143)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com>
Co-authored-by: Yeming Liu <yeliu@microsoft.com>
Co-authored-by: Yeming Liu <yeliu@microsoft.com>
Co-authored-by: DanielMicrosoft <dlanguiller@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Srinivaas Ganesan <srganesa@microsoft.com>
Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Feb 11, 2026

@copilot Change the parameter name from "Tag" to "Tags"

Changed parameter name from Tag to Tags with Tag as an alias, matching the convention used in other Compute cmdlets like New-AzVMConfig. Commit: 76fccff

Copilot AI changed the title Add Tag and Location parameters to SSH key cmdlets Add Tags and Location parameters to SSH key cmdlets Feb 11, 2026
vidai-msft and others added 23 commits February 12, 2026 15:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Haider Agha <64601174+haagha@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Co-authored-by: Arsene Muhire <arsenemuhire@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.