dsccommunity / dsccommunity/ComputerManagementDsc
SmbShare: Set-TargetResource will always set all properties
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 338
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Details of the scenario you tried and the problem that is occurring
The Set-TargetResource function will always set all properties regardless if a property is already in desired state.
This is to track a review comment made in PR #211.
Verbose logs showing the problem
Not available
Suggested solution to the issue
Add a helper function, preferably the pattern started in xActiveDirectory to return a hashtable with the properties and also sets a property if that property is in desired state an not.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# not available
The operating system the target node is running
n/a
Version and build of PowerShell the target node is running
n/a
Version of the DSC module that was used ('dev' if using current dev branch)
dev
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 at the SmbShare Set-TargetResource implementation and compare it with the helper pattern linked from xActiveDirectory. Confirm which properties are already in the desired state, then ensure only properties needing changes are set; done means unchanged properties are not written while out-of-state properties still are.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100