Microsoft.Filesystem.File/Content - Froce tor create path if don't exist
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
Start with the Microsoft.Filesystem.File/Content resource and reproduce the YAML configuration using a nested, nonexistent Windows path such as C:\dsc\config\file-content\New\TestFile.txt. Read the resource behavior around file creation and the reported “path specified” error, then verify that the selected force behavior creates the directories and file successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary of the new feature / enhancement
Hi team,
Is a possibility to create whole folder path and structure when file shoudl be located in dedicated folder, smililar like in PowerShell with --force swith when we create New-Item, I see scenarios whe this will be reguired before servers or application be install or created
Example of config
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Test File
type: Microsoft.Filesystem.File/Content
properties:
_exist: true # This will work as force
path: C:\dsc\config\file-content\New\TestFile.txt
content: "This is a test file."
or option B
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Test File
type: Microsoft.Filesystem.File/Content
properties:
force: true # Creation file and path
path: C:\dsc\config\file-content\New\TestFile.txt
content: "This is a test file."
Proposed technical implementation details (optional)
Now when I try to create file in path that don't exist as Subfolder I got error"
ontent' using 'filecontent'
2026-09-20T18:58:38.517129Z DEBUG dsc_lib::dscresources::command_resource: 912: Process 'filecontent' id 6008 exited with code 0
2026-09-20T18:58:38.537890Z DEBUG dsc_lib::dscresources::command_resource: 196: Verifying output of get on 'Microsoft.Filesystem.File/Content' using 'filecontent'
2026-09-20T18:58:38.538332Z DEBUG dsc_lib::dscresources::command_resource: 586: Retrieved schema for resource 'Microsoft.Filesystem.File/Content' with version '0.1.0' from cache
2026-09-20T18:58:38.618624Z ERROR dsc_lib::dscresources::command_resource: 1313: PID 9064: Failed to write file 'C:\dsc\config\file-content\New\TestFile.txt': The system cannot find the path specified. (os error 3)
2026-09-20T18:58:38.619190Z DEBUG dsc_lib::dscresources::command_resource: 912: Process 'filecontent' id 9064 exited with code 3
2026-09-20T18:58:38.619546Z ERROR dsc_lib::dscresources::command_resource: 970: Failed to run process 'filecontent': Command: Resource 'filecontent' [exit code 3] manifest description: File operation error
2026-09-20T18:58:38.620590Z ERROR dsc::subcommand: 108: Error: Command: Resource 'filecontent' [exit code 3] manifest description: File operation error
PS C:\dsc\config\file-content>
- Lingua principale
- Rust
- Stelle
- 526
- Fork
- 76
- Merge medio
- 4g 20h
- PR unite (30g)
- 24
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/DSC
-
Issue-Enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
PowerShell/DSC#1729 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Feature Request: Support dsc functions in executable argsForse già presa @SteveL-MSFT l’ha presa 4 giorni fa. ApertaIssue-Enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
PowerShell/DSC#1722 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Dev-UX Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PowerShell/DSC#1694 ·
I maintainer di solito rispondono entro 2 giorni
-
Issue-Enhancement Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
PowerShell/DSC#1683 · 5 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Issue-Enhancement Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PowerShell/DSC#1673 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di PowerShell/DSC
Issue simili
-
backend::vllm diffusion multimodal
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
lambdaclass/ethrex#7329 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
shadowsocks/shadowsocks-rust#2186 · 1 commento ·
-
[Chore]: Inconsistent wasm-pack binary invocation in justfile breaks cross-platform executionApertaC-bug S-awaiting-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
juspay/hyperswitch#14479 ·
I maintainer di solito rispondono entro 1 giorno