Now when Test-AccountPolicyTargetResource is executed, it errors.
Verbose logs showing the problem
Get-Command : The term 'Set-TargetResource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Program
Files\WindowsPowerShell\Modules\SecurityPolicyDsc\2.10.0.0\Modules\SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1:467 char:27
+ ... ameters = ( Get-Command -Name "Set-TargetResource" -Module $ModuleNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-TargetResource:String) [Get-Command], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
Suggested solution to the issue
C:\Program
Files\WindowsPowerShell\Modules\SecurityPolicyDsc\2.10.0.0\Modules\SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1
Line 467-468
Details of the scenario you tried and the problem that is occurring
We bypass the LCM and process the MOF manually. To avoid conflicts in loading DSC Modules, they are imported using the -Prefix argument.
Now when Test-AccountPolicyTargetResource is executed, it errors.
Verbose logs showing the problem
Suggested solution to the issue
C:\Program Files\WindowsPowerShell\Modules\SecurityPolicyDsc\2.10.0.0\Modules\SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1 Line 467-468
Current:
Proposed:
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used