Powershell DSC - MSFT_RoleResource

Nicolas VACCARO 1 Reputation point


I have a problem related to MSFT_RoleResource, I have recovered a DSC script that you can find below:

Configuration InstallerSNMP {

Import-DscResource –ModuleName PSDesiredStateConfiguration

Node MonServeur {
WindowsFeature SNMPService
Name = "SNMP-Service"
Ensure = "Present"

The compilation in .mof works as shown below:


Once the compilation is finished I want to make an Azure policy, the compilation works as shown below ( it's very strange because when i compile the script i have error who say replace the PSDesiredStateConfiguration By PSDresource):


I want to test it afterwards but it sends me this error:


Can you help me?

Thank you so much

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,183 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 38,881 Reputation points

    Hi @Nicolas VACCARO

    Like all Windows software, DSC records errors and events in logs that can be viewed from the Event Viewer. Examining these logs can help you understand why a particular operation failed, and how to prevent failure in the future.

    In Event Viewer, DSC events are in: Applications and Services Logs/Microsoft/Windows/Desired State Configuration

    Maybe you can also try using the Get-DscConfigurationStatus cmdlet to get information about configuration status from a target node and see if are some issues there. You can dig into the object to discover details about the configuration run such as:

    -All of the resources that failed
    -Any resource that requested a reboot
    -Meta-Configuration settings at the time of configuration run.

    Troubleshooting DSC

    Hope this resolves your Query!!


    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments