Skip to content

Add reference documentation for Microsoft.OpenSSH.SSHD/Windows#934

Open
Gijsreyn wants to merge 6 commits intoPowerShell:mainfrom
Gijsreyn:reference-doc-sshdconfig
Open

Add reference documentation for Microsoft.OpenSSH.SSHD/Windows#934
Gijsreyn wants to merge 6 commits intoPowerShell:mainfrom
Gijsreyn:reference-doc-sshdconfig

Conversation

@Gijsreyn
Copy link
Copy Markdown
Collaborator

@Gijsreyn Gijsreyn commented Jul 2, 2025

PR Summary

As part of #665, this PR adds reference documentation for the Microsoft.OpenSSH.SSHD/Windows resource.

PR Context

@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from 598a6fe to e0fedee Compare July 2, 2025 14:13
@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from e0fedee to fa1b824 Compare July 15, 2025 04:34
@Gijsreyn Gijsreyn marked this pull request as ready for review July 15, 2025 05:10
@Gijsreyn
Copy link
Copy Markdown
Collaborator Author

Hi @tgauth, I saw #907 got merged and thought of creating some reference documentation. Do you mind for a review :)?

@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from adb4db3 to c6dba04 Compare July 21, 2025 23:25
Comment on lines +54 to +55
- The resource must run at least under a Windows Server 2019 or Windows 10 (build 1809)
operating system.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The resource must run at least under a Windows Server 2019 or Windows 10 (build 1809)
operating system.
- The resource must run under a Windows Server 2019 or Windows 10 (build 1809) operating system or
later.

```

</details>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Missing description for this resource property - presumably it's the full configuration as an object?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The resource is only usable with export, but requires the map property to be defined, so do users need to export it with an empty object? Does the resource use the object for filtering during an export operation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@tgauth mind filling in the gap here? I couldn't quickly find it from the resource.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Missing description for this resource property - presumably it's the full configuration as an object?

Yes, exactly!

The resource is only usable with export, but requires the map property to be defined, so do users need to export it with an empty object? Does the resource use the object for filtering during an export operation?

Users do not need to export with an empty object. Schema is still a work in progress :) have an open PR that will shift to not requiring the map and simply permit additional properties

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, Tess. I'll wait for that PR to get merged and update this one.

@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from c6dba04 to 8df2b25 Compare July 29, 2025 00:29
@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from 8df2b25 to 3509e6b Compare August 11, 2025 23:02
Copilot AI review requested due to automatic review settings May 7, 2026 02:16
@Gijsreyn Gijsreyn force-pushed the reference-doc-sshdconfig branch from 3509e6b to 40d6808 Compare May 7, 2026 02:16
Copy link
Copy Markdown
Contributor

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 reference documentation under docs/reference/resources for the built-in OpenSSH DSC resources, intended to support issue #665 (“Document built-in resources”).

Changes:

  • Adds a new reference page and example for Microsoft.OpenSSH.SSHD/Windows.
  • Adds a new reference page for Microsoft.OpenSSH.SSHD/sshd_config.
  • Adds (but currently leaves empty) an sshd_config example page referenced from the new index.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 17 comments.

File Description
docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md New reference doc for the Windows OpenSSH “windows-global” resource (default shell settings).
docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/examples/configure-default-shell-powershell.md New example showing how to set the default shell to Windows PowerShell.
docs/reference/resources/Microsoft/OpenSSH/SSHD/sshd_config/index.md New reference doc for the sshd_config resource (but currently mismatches actual resource schema/capabilities).
docs/reference/resources/Microsoft/OpenSSH/SSHD/sshd_config/examples/export-openssh-configuration.md Example file referenced by the docs, but currently empty.

Comment thread docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md Outdated
Comment thread docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md
Comment thread docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md Outdated
Comment thread docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md
The `Microsoft.OpenSSH.SSHD/Windows` resource enables you to idempotently manage SSH server
configuration. The resource can:

- Add and update SSH client and server configuration settings.
Comment on lines +49 to +55
## Requirements

- The resource requires OpenSSH server and client to be installed on the Windows system.
- The resource must run in a process context that has permissions to manage the SSH server
configuration settings.
- The resource must run at least under a Windows Server 2019 or Windows 10 (build 1809)
operating system.
Comment on lines +130 to +131
Determines whether shell arguments should be escaped. When set to `true`, the arguments provided
in `shell_arguments` will be properly escaped before being passed to the shell.

- [map](#map) -

- **Key properties:** <a id="key-properties"> The following properties uniquely identify an
differingProperties: []
```

## Cleanup
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

set with an empty string for the shell will also effectively clear any configured shell value, if applicable - https://github.com/PowerShell/DSC/blob/main/resources/sshdconfig/tests/defaultshell.tests.ps1#L151

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.

4 participants