PowerShell DSC Blog Series, Part 5- Point in Time List of DSC Resources
Welcome to Part 5 of the Building Clouds blog series on Windows PowerShell Desired State Configuration. Here is a quick recap of what has been published before this post:
Part 1 – Information about DSC
Part 2 – Authoring DSC Resources when Cmdlets Already Exist
Part 3 – Testing DSC Resources
Part 4 – How-To use PowerShell DSC from your workstation to test PowerShell JEA, in Azure
What is a DSC Resource?
With any new technology there is a glossary of terms to learn. DSC is pretty straightforward but “Resource” is key to this topic.
- DSC Resource – a PowerShell module constructed in a specific way that provides Get, Set, and Test functions, and a schema file that helps DSC enumerate the properties that are available to be configured. Resources can also be based on WMI or Python in the case of Linux.
Or to put it more simply, Resources are the instructions that tell DSC how to manage stuff, like settings and programs. If you want DSC to copy a file you would use the File Resource. If you want DSC to configure a registry setting you would use the Registry Resource.
For a deeper dive on Resources, I would recommend the DSC Resource documentation on TechNet and The DSC Book, as well as Bing since more information and articles are being published literally daily on this topic.
Point in Time List of DSC Resources
Have you ever heard this before? “We will be looking at DSC when there are more resources available.” This statement is looking for a Tipping Point. If that’s the case but you don’t know where to look or you have been too busy, you might not have noticed the increasing number of resources available for DSC.
To assist your discovery, I am publishing a list of current DSC resources and what they do. Just like the first article in this series this will be a moving target. As soon as I hit publish I will be out of date and I won’t promise to curate this list. The PowerShell team and the PowerShell community are publishing new resources aggressively. The point is to emphasize that the list has grown considerably in a very short period of time.
If you haven’t looked in a while, you might want to take a glance because there is a good chance the resources you were waiting for have become available. In fact, Wave 4 of the DSC Resource Kit was recently released.
If you take nothing else away from this post – remember where to look for DSC resources!
- DSC Resources shipped with Windows
- Resources available in the PowerShell DSC Resource Kit
- Resources available from the community GitHub Repository
DSC Resources shipped with Windows
These resources ship with PowerShell DSC, either via WMF or inside Windows installations.
Archive | Provides a mechanism to unpack archive (.zip) files at a specific path |
Environment | Provides a mechanism to manage system environment variables. |
File | Provides a mechanism to manage files and folders on the target node. |
Group | Provides a mechanism to manage local groups on the target node. |
Log | Provides a mechanism to write messages to the Microsoft-Windows-Desired State Configuration/Analytic event log. |
Package | Provides a mechanism to install or uninstall packages, such as Windows Installer and setup.exe packages, on a target node. |
Registry | Provides a mechanism to manage registry keys and values on a target node. |
Script | Provides a mechanism to run Windows PowerShell script blocks on target nodes. |
Service | Provides a mechanism to manage services on the target node. |
User | Provides a mechanism to manage local user accounts on the target node. |
WindowsFeature | Provides a mechanism to ensure that roles and features are added or removed on a target node. |
WindowsProcess | Provides a mechanism to configure processes on a target node. |
Resources available in the PowerShell DSC Resource Kit
These resources are published to the online gallery. Additional information about how to use them is available at the bottom of the following page - https://gallery.technet.microsoft.com/scriptcenter/DSC-Resource-Kit-All-c449312d.
xActiveDirectory | |
xADDomain | Create new Active directory forest configuration or new Active directory domain configuration. |
xADDomainController | Install a Domain Controller in Active Directory. |
xADUser | Add or Remove an Active Directory user. |
xWaitForADDomain | Waits for a new domain to become available. |
xADDomainTrust | Create and configure Active Directory domain trusts. |
xAzure | |
xAzureAffinityGroup | Creates and configures an Azure Affinity Group. |
xAzureQuickVM | Provision an Azure Virtual Machine with minimal input. |
xAzureService | Create and configure an Azure Cloud Service. |
xAzureStorageAccount | Create and configure an Azure Storage Account. |
xAzureSubscription | Register an Azure subscription from a .publishsettings file to the computer. |
xAzureVM | Create and configure an Azure virtual machine |
xComputerManagement | |
xComputer | Rename a computer and add it to a domain or workgroup. |
xDatabase | |
xDatabase | Handles creation/deletion of a database using a dacpac or sql connection string. |
xDBPackage | Allows extraction of a dacpac or import of a bacpac from a database. |
xDHCPServer | |
xDhcpServerScope | Create and configure a DHCP Scope |
xDhcpServerReservation | Create and configure DHCP Reservations |
xDhcpServerOption | Create and configure DHCP Scope Options |
xDnsServer | |
xDnsServerSecondaryZone | Create and configure a DNS Secondary Zone |
xDnsServerZoneTransfer | Configure DNS server Zone Transfer |
xFailOverCluster | |
xCluster | Create and configurate a failover cluster. |
xWaitForCluster | Waits for a new failover cluster to become available. |
xHyper-V | |
xVhd | Create a virtual disk. |
xVhdFileDirectory | Copy contents in to a virtual disk. |
xVMHyperV | Create and set properties of a virtual machine. |
xVMSwitch | Create and configure a virtual switch. |
xJEA (Just Enough Administration) | |
xJeaEndPoint | Create and configure JEA Endpoints |
xJeaToolkit | Create and configure JEA Toolkits |
xNetworking | |
xDnsServerAddress | Configure the DNS settings of a network adapter. |
xFirewall | Configure host firewall rules. |
xIPAddress | Configure the IP Adrress, Gateway, and Subnet Mask of a network adapter. |
xPSDesiredStateConfiguration | |
xDscWebService | Allows the configuration of an OData endpoint for DSC Service, so that a node can become a DSC Pull Server. |
xPackage | Allows .msi and .exe software installations. |
xProcess | Enhancement to the in box WindowsProcess resource and allows you to run a process under the context of a user |
xPSEndPoint | Allows you to create PowerShell session configuration. This resource allows you to specify RunAs account, startup script, SDDL to allow users to connect to this session configuration, as well as ability to restrict the remote access to it. |
xArchive | Allows you to create archive files as well as expand existing archive files. |
xService | Enhancement on the in box Service resource and allows you to create and delete a service. |
xRemoteFile | Allows you to download a file from HTTP or HTTPS locations to a local destination. It allows you to specify the user agent and headers when sending a web request. |
xRemoteDesktopSessionHost | |
xRDSessionDeployment | Creates and configures a deployment in RDSH. |
xRDSessionCollection | Creates a RDSH collection. |
xRDSessionCollectionConfiguration | Allows configuration of a RDSH collection. |
xRDRemoteApp | Publish applications for your RDSH collection. |
xSmbShare | |
xSmbShare | Setup and configure an SMB Share. |
xSqlIPs | |
xSqlHAEndPoint | Configure the given instance of SQL high availability service to listen port 5022 with given name, and assigning users that are allowed to communicate through the SQL endpoint. |
xSqlHAGroup | Configure a SQL High Availability Group |
xSqlHAService | Enable SQL High Availability (HA) service on a given SQL instance. |
xSqlServerInstall | Install SQL Enterprise on a target machine. |
xWaitForSqlHAGroup | Waits for SQL HA group to be ready by checking the state of the HA group of a given name in a given interval till either the HA group is discoverable or the number of retries reached its maximum. |
xSystemSecurity | |
xUAC | Handles how and when the User Account Control Windows Prompt shows up or doesn't show up. |
xIEEsc | Enables or disables IE Enhanced Security Configuration. |
xWebAdministration | |
xWebsite | Allows you to manage IIS Websites. |
xWebAppPool | Allows you to manage IIS App Pools. |
xWebVirtualDirectory | Allows you to manage IIS Web Virtual Directories. |
xWebApplication | Allows you to manage IIS Web Applications. |
xWebConfigKeyValue | Allows you to update key value pairs in the AppSettings section of Web.Config. |
xWinEventLog | |
xWinEventLog | Configure the Windows Event Log |
Resources available from the community GitHub Repository
These resources are contributed by the community to a GitHub repo maintained by PowerShell.org, available at the following page - https://github.com/powershellorg/dsc
There is some overlap. That is on purpose. When the community would like to extend either a stock resource or one from the resource kit, the resource is renamed by pre-pending a “c” to signify “community” and someone contributes work to extend what is available.
GlobalAssemblyCache | PSHOrg_cADDomain | PSHOrg_cDNSServerAddress | cScriptResource |
StackExchange_CertificateStore | PSHOrg_cADDomainController | PSHOrg_cFirewall | cSqlHAEndPoint |
StackExchange_FirewallRule | PSHOrg_cADUser | PSHOrg_cIPAddress | cSqlHAGroup |
StackExchange_NetworkAdapter | PSHOrg_cWaitForADDomain | PSHOrg_cDSCWebService | cSqlHAService |
StackExchange_PageFile | PSHOrg_cComputer | PSHOrg_cSmbShare | cSqlServerInstall |
StackExchange_PowerPlan | PSHOrg_cCluster | PSHOrg_cSqlHAEndPoint | cWaitForSqlHAGroup |
StackExchange_ScheduledTask | PSHOrg_cWaitForCluster | PSHOrg_cSqlHAGroup | ICG_SCOMAgentMgmtGroup |
StackExchange_SetExecutionPolicy | PSHOrg_cVHD | PSHOrg_cSqlHAService | ICG_SCOMBulkMP |
StackExchange_Timezone | PSHOrg_cVMHost | PSHOrg_cSqlServerInstall | ICG_SCOMImportMP |
PSHOrg_cVMHyperV | PSHOrg_cWaitForSqlHAGroup | HostsFile | |
PSHOrg_cVMSwitch | PSHOrg_cAppPool | ||
PSHOrg_cVhdFileDirectory | PSHOrg_cWebsite |
If you are looking for something and it is not available from these sources (and you can’t find it elsewhere using Bing), please comment a request on the PowerShell.org article below.
We Want Your DSC Resource Wish List!
https://powershell.org/wp/2014/03/20/we-want-your-dsc-resource-wish-list/
Thank you and stay tuned to Building Clouds!