I was able to create the package once NOT in Administrator mode, and then every time after that, the cmdlet throws that it cannot remove the Linux resource files under some generated location within the module.
This temporary location should not exist in the first place.
Files should not be saved within the module.
Context AdministratorsGroupMembers
WARNING: The configuration 'administrators_group_members' is using one or more resources outside of the GuestConfiguration module. Please make sure these resources work with PowerShell Core
[-] Error occurred in Context block 0ms
DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\GuestConfig\bin\1.19.4\c6041f8a-9a4e-49ed-8e91-19852f87bf54\ob3nmxkzav\AdministratorsGroupMembers\AdministratorsGroupMembers_1.3.0.0\unzippedPackage\Modules\GuestConfiguration\DscResources\MSFT_ChefInSpecResource\MSFT_ChefInSpecResource.schema.mof'.
at Copy-DscResources, C:\Program Files\WindowsPowerShell\Modules\GuestConfiguration\1.19.4\helpers\GuestConfigurationPolicy.psm1: line 118
at New-GuestConfigurationPackage, C:\Program Files\WindowsPowerShell\Modules\GuestConfiguration\1.19.4\GuestConfiguration.psm1: line 80
at New-BuiltInGuestConfigurationPolicyPackage, C:\GitHub\Clones\inguest-policy\Scripts\PolicyPackages\PolicyPackageGenerationTool.psm1: line 198
at <ScriptBlock>, C:\GitHub\Clones\inguest-policy\Scripts\PolicyPackages\Tests\PolicyPackageGenerationTool.Tests.ps1: line 156
at DescribeImpl, C:\Program Files\WindowsPowerShell\Modules\Pester\4.10.1\Functions\Describe.ps1: line 213
Context AdministratorsGroupMembersToExclude
WARNING: The configuration 'AdministratorsGroupMembersToExclude' is using one or more resources outside of the GuestConfiguration module. Please make sure these resources work with PowerShell Core
[-] Error occurred in Context block 0ms
DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\GuestConfig\bin\1.19.4\c6041f8a-9a4e-49ed-8e91-19852f87bf54\ob3nmxkzav\AdministratorsGroupMembersToExclude\AdministratorsGroupMembersToExclude_1.1.0.0\unzippedPackage\Modules\GuestConfiguration\DscResources\MSFT_ChefInSpecResource\install_inspec.sh'.
at Copy-DscResources, C:\Program Files\WindowsPowerShell\Modules\GuestConfiguration\1.19.4\helpers\GuestConfigurationPolicy.psm1: line 118
at New-GuestConfigurationPackage, C:\Program Files\WindowsPowerShell\Modules\GuestConfiguration\1.19.4\GuestConfiguration.psm1: line 80
at New-BuiltInGuestConfigurationPolicyPackage, C:\GitHub\Clones\inguest-policy\Scripts\PolicyPackages\PolicyPackageGenerationTool.psm1: line 198
at <ScriptBlock>, C:\GitHub\Clones\inguest-policy\Scripts\PolicyPackages\Tests\PolicyPackageGenerationTool.Tests.ps1: line 156
at DescribeImpl, C:\Program Files\WindowsPowerShell\Modules\Pester\4.10.1\Functions\Describe.ps1: line 213
I was able to create the package once NOT in Administrator mode, and then every time after that, the cmdlet throws that it cannot remove the Linux resource files under some generated location within the module. This temporary location should not exist in the first place. Files should not be saved within the module.