Exception: Found a dependency on resources from the PSDesiredStateConfiguration module
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- devops
Research direction
Start with the PowerShell configuration and the generated MOF shown in the issue, comparing the resource module recorded there with the module imported by the configuration. Verify the package-build entry point against this minimal File resource example; done means the example packages without the dependency exception.
Written by the indexing model from the issue text.
Description
Hi I have error when I try to build packed for guest configuration
Exception: Found a dependency on resources from the PSDesiredStateConfiguration module, but we cannot copy these resources into the Guest Configuration package.
Please switch these resources to using the PSDscResources module instead.
My code for this to test
Configuration CreateFileExample
{
#Import-DscResource -ModuleName PSDscResources
Node localhost
{
File ExampleFile
{
DestinationPath = "C:\Temp\example.txt"
Ensure = "Present"
Contents = "This file was created by DSC."
Type = "File"
}
}
}
CreateFileExample
Build MOF file
/*
@TargetNode='localhost'
@GeneratedBy=mmach
@GenerationDate=03/09/2026 21:13:32
@GenerationHost=XXXX-MICHAL
*/
instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
{
ResourceID = "[File]ExampleFile";
ModuleName = "PSDesiredStateConfiguration";
DestinationPath = "C:\\Temp\\example.txt";
Type = "File";
Contents = "This file was created by DSC.";
Ensure = "Present";
SourceInfo = "C:\\Users\\mmach\\OneDrive\\Skrypty\\DSC\\AzureDay-example\\GuestConfiguration\\dsc-file.ps1::7::9::File";
ModuleVersion = "1.0";
ConfigurationName = "CreateFileExample";
};
instance of OMI_ConfigurationDocument
{
Version="2.0.0";
MinimumCompatibleVersion = "1.0.0";
CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};
Author="mmach";
GenerationDate="03/09/2026 21:13:32";
GenerationHost="XXXX-MICHAL";
Name="CreateFileExample";
};
- Dominant language
- PowerShell
- Stars
- 8
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
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.
More from Azure/GuestConfiguration
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Azure/GuestConfiguration#322 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/GuestConfiguration#319 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Azure/GuestConfiguration#312 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Azure/GuestConfiguration#308 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/GuestConfiguration#307 ·
All issues in Azure/GuestConfiguration
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
repo:raw-data
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hotosm/raw-data-api#316 · 1 comment ·
-
agentic-workflows cascade-suspected
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
willow
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openedx/openedx-authz#460 ·