Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add support for `actions`

Aperta
#1,470 14 commenti 2 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@SteveL-MSFT ci sta già lavorando.

Dal 2/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Issue-Enhancement
Summary of the new feature / enhancement

As part of configuring a service, like sshd, the changes don't take effect until after the service is restarted. This can, today, be worked around by using the Microsoft.Windows/Service to stop and start it, but an action to restart would be better and also only restart if settings have changed since restarting a service can, for example, disconnect active clients.

Proposed technical implementation details (optional)

Ideally, it would work like:

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Install PowerShell 7
  type: Microsoft.WinGet/Package
  properties:
    id: Microsoft.PowerShell
- name: Install SSHD
  type: Microsoft.Windows/FeatureOnDemandList
  properties:
    capabilities:
    - identity: OpenSSH.Server~~~~0.0.1.0
      state: Installed
- name: Add PS7 SSH Subsystem
  type: Microsoft.OpenSSH.SSHD/Subsystem
  properties:
    subsystem:
      name: powershell
      value: C:/progra~1/powershell/7/pwsh.exe -sshs
- name: Restart SSHD, if changed
  type: Microsoft.WIndows.Action/RestartService
  condition: "[stateChanged(resourceId('Microsoft.OpenSSH.SSHD/Subsystem','Add PS7 SSH Subsystem'))]"
  properties:
    name: sshd

This would need a new stateChanged() function that takes a resourceId() and returns true only if that resource resulted in a state change. Otherwise, the restart would be skipped.

Lingua principale
Rust
Stelle
526
Fork
76
Merge medio
4g 20h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/DSC

Tutte le issue di PowerShell/DSC

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.