Native DSC module for Ansible
PowerShell Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


win_dsc has been merged to ansible core, so please do not submit issues/pull requests against this repo. Please update your playbooks to use win_dsc from Ansible core.


Native DSC module for Ansible.

PowerShell 5.0, which is included in [Windows Management Framework 5.0][] need to be installed on managed nodes. You can read more about Windows Management Framework 5.0 here.

Before using the win_dsc5 module, use the win_lcm5 module to set refresh mode to "Disabled" on the managed node.

Also, make sure the required DSC resources exist on the managed node.

If the DSC Resource need a Credential Object as Parameter do as follow:


Example xADDomain

   - name: Installing Domain
       resource_name: "xADDomain"
       DomainName: "{{ads_domain_name}}"
       DomainAdministratorCredential_username: "Administrator"
       DomainAdministratorCredential_password: "{{ads_administrator_password}}"
       SafemodeAdministratorPassword_username: "Administrator"
       SafemodeAdministratorPassword_password: "{{ads_administrator_password}}"

If the DSC Resource need a String Array as Parameter do as follow:

Parametername: "string1,string2"

The commaseperated string will get split and a Powershell String Array will get Attached to the Property.

Example xSmbShare

   - name: Create Share
        resource_name: "xSmbShare"
        Ensure: "Present"
        item_name: "MyShare"
        Path: "C:\\Data\\MyShare"
        Description: "This will be my Share"
        ReadAccess: "Domain Users"
        ChangeAccess: "User1,User2"
        FullAccess: "Domain Admins"

You should also check out a few other repos related to DSC and Ansible: