Skip to content

Conversation

tgauth
Copy link
Collaborator

@tgauth tgauth commented Jun 24, 2025

PR Summary

  • update sshdconfig resource to include get & set to configure Windows registry for Win32-OpenSSH's default shell options

PR Context

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for configuring a default shell in the sshdconfig tool by wiring up new get/set commands to Windows registry keys, updating the DSC resource manifest, and providing Pester tests to verify behavior.

  • Implement get/set for DefaultShell in Rust (src/get.rs, src/set.rs) with Windows registry integration
  • Extend CLI with clap (src/args.rs, src/main.rs), update export behavior, and add JSON schema
  • Add Pester tests (sshdconfig/tests/defaultshell.tests.ps1) and update DSC manifest (sshdconfig/sshd.dsc.resource.json) and packaging (build.ps1)

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sshdconfig/tests/defaultshell.tests.ps1 New Pester tests for DefaultShell get/set on Windows and errors on non-Windows
sshdconfig/sshd.dsc.resource.json DSC resource manifest exposing get/set commands for default shell
sshdconfig/src/set.rs Windows registry write/remove logic for DefaultShell
sshdconfig/src/get.rs Windows registry read logic for DefaultShell
sshdconfig/src/main.rs Switch to clap for CLI parsing, wire up get/set/schema
sshdconfig/src/metadata.rs Added RepeatableKeyword enum for future keywords
sshdconfig/src/error.rs Added InvalidInput and RegistryError variants to error enum
sshdconfig/src/args.rs Defined DefaultShell struct and Set subcommand schema
sshdconfig/src/export.rs Changed export to print JSON directly
sshdconfig/Cargo.toml Added clap and conditional registry_lib dependencies
build.ps1 Updated packaging entries for new resource manifest files
Comments suppressed due to low confidence (1)

build.ps1:64

  • Packaging script references 'sshd_config.dsc.resource.json' but this file is not present in the repo. Ensure the file is committed or remove this entry from the build manifest.
    'sshd_config.dsc.resource.json',

@tgauth tgauth removed the request for review from adityapatwardhan July 11, 2025 17:04
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Jul 11, 2025
Merged via the queue into PowerShell:main with commit b41ba10 Jul 11, 2025
4 checks passed
@tgauth tgauth deleted the add-sshdconfig-default-shell branch July 11, 2025 17:56
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.

3 participants