Doc: WinPS resources need to be installed for AllUsers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Summary
The fundamental issue is:
- WinPS Adapter only uses PSDSC 1.1 because it comes with Windows
- PSDSC 1.1 always uses LCM which runs as a Windows service
- Windows service only has view of AllUsers under ProgramFiles (this was a design decision for DSC v1)
So this means that any configuration that requires WinPS (explicitly or implicitly) they will hit an error that the resource is not found unless that resource is installed for scope AllUsers. PSDSC v2 fixes this, but is not part of Windows so would be an additional dependency.
At this time, I think we should just doc that WinPS adapter requires resources to be installed for AllUsers
@michaeltlombardi @theJasonHelmick
Steps to reproduce
Install-Module ComputerManagmentDsc -Scope CurrentUser
$yaml = @'
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Install OpenSSH Server
type: ComputerManagementDsc/WindowsCapability
properties:
Ensure: Present
Name: OpenSSH.Server~~~~0.0.1.0
'@
dsc config test -i $yaml
### Expected behavior
```console
success
Actual behavior
error resource not found
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.0-preview.4
PSEdition Core
GitCommitId 7.6.0-preview.4
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
3.1.0-preview.3
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the documentation for the WinPS adapter and reviewing the reported reproduction with Install-Module ComputerManagmentDsc -Scope CurrentUser and dsc config test -i. Done means the documentation clearly states that WinPS resources must be installed for the AllUsers scope and explains the resulting resource-not-found behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100