Documentation
Table of Contents
Description
This is an auto-generated module, using the Puppet DSC Builder to vendor and expose the PowerShell module's DSC resources as Puppet resources. The functionality of this module comes entirely from the vendored PowerShell resources, which are pinned at v2.12.0.0. The PowerShell module describes itself like this:
This module contains the standard DSC resources. Because PSDscResources overwrites in-box resources, it is only available for WMF 5.1. Many of the resource updates provided here are also included in the xPSDesiredStateConfiguration module which is still compatible with WMF 4 and WMF 5 (though that module is not supported and may be removed in the future).
For information on troubleshooting to determine whether any encountered problems are with the Puppet wrapper or the DSC resource, see the troubleshooting section below.
Requirements
This module, like all auto-generated Puppetized DSC modules, relies on two important technologies in the Puppet stack: the Puppet Resource API and the puppetlabs/pwshlib Puppet module.
The Resource API provides a simplified option for writing types and providers and is responsible for how this module is structured. The Resource API ships inside of Puppet starting with version 6. While it is technically possible to add the Resource API functionality to Puppet 5.5.x, the DSC functionality has not been tested in this setup. For more information on the Resource API, review the documentation.
The module also depends on the pwshlib module. This Puppet module includes two important things: the ruby-pwsh library for running PowerShell code from ruby and the base provider for DSC resources, which this module leverages.
All of the actual work being done to call the DSC resources vendored with this module is in this file from the pwshlib module. This is important for troubleshooting and bug reporting, but doesn't impact your use of the module except that the end result will be that nothing works, as the dependency is not installed alongside this module!
Usage
You can specify any of the DSC resources from this module like a normal Puppet resource in your manifests. The examples below use DSC resources from from the PowerShellGet repository, regardless of what module you're looking at here; the syntax, not the specifics, is what's important.
For reference documentation about the DSC resources exposed in this module, see the Reference Forge tab, or the REFERENCE.md file.
# Include a meaningful title for your resource declaration
dsc_psrepository { 'Add team module repo':
dsc_name => 'foo',
dsc_ensure => present,
# This location is nonsense, can be any valid folder on your
# machine or in a share, any location the SourceLocation param
# for the DSC resource will accept.
dsc_sourcelocation => 'C:\Program Files',
# You must always pass an enum fully lower-cased;
# Puppet is case sensitive even when PowerShell isn't
dsc_installationpolicy => untrusted,
}
dsc_psrepository { 'Trust public gallery':
dsc_name => 'PSGallery',
dsc_ensure => present,
dsc_installationpolicy => trusted,
}
dsc_psmodule { 'Make Ruby manageable via uru':
dsc_name => 'RubyInstaller',
dsc_ensure => present,
}
For more information about using a built module, check out our narrative documentation.
Properties
Note that the only properties specified in a resource declaration which are passed to Invoke-Dsc are all prepended with dsc.
If a property does _not start with dsc_ it is used to control how Puppet interacts with DSC/other Puppet resources - for example,
specifying a unique name for the resource for Puppet to distinguish between declarations or Puppet metaparameters (notifies,
before, etc).
Troubleshooting
In general, there are three broad categories of problems:
- Problems with the way the underlying DSC resource works.
- Problems with the type definition, where you can't specify a valid set of properties for the DSC resource
- Problems with calling the underlying DSC resource - the parameters aren't being passed correctly or the resource can't be found
Unfortunately, problems with the way the underlying DSC resource works are something we can't help directly with. You'll need to file an issue with the upstream maintainers for the PowerShell module.
Problems with the type definition are when a value that should be valid according to the DSC resource's documentation and code is not accepted by the Puppet wrapper. If and when you run across one of these, please file an issue with the Puppet DSC Builder; this is where the conversion happens and once we know of a problem we can fix it and regenerate the Puppet modules. To help us identify the issue, please specify the DSC module, version, resource, property and values that are giving you issues. Once a fix is available we will regenerate and release updated versions of this Puppet wrapper.
Problems with calling the underlying DSC resource become apparent by comparing <value passed in in puppet>
with <value received by DSC>
.
In this case, please file an issue with the puppetlabs/pwshlib module, which is where the DSC base provider actually lives.
We'll investigate and prioritize a fix and update the puppetlabs/pwshlib module.
Updating to the pwshlib version with the fix will immediately take advantage of the improved functionality without waiting for this module to be reconverted and published.
For specific information on troubleshooting a generated module, check the troubleshooting guide for the puppet.dsc module.
Known Limitations
Currently, because of the way Puppet caches files on agents, use of the legacy puppetlabs-dsc
module is not compatible with this or any auto-generated DSC module.
Inclusion of both will lead to pluginsync conflicts.
Reference
Table of Contents
Resource types
dsc_archive
: The DSC Archive resource type. Automatically generated from version 2.12.0.0dsc_environment
: The DSC Environment resource type. Automatically generated from version 2.12.0.0dsc_group
: The DSC Group resource type. Automatically generated from version 2.12.0.0dsc_groupset
: The DSC resource type. Automatically generated from version 2.12.0.0dsc_msipackage
: The DSC MsiPackage resource type. Automatically generated from version 2.12.0.0dsc_processset
: The DSC resource type. Automatically generated from version 2.12.0.0dsc_registry
: The DSC Registry resource type. Automatically generated from version 2.12.0.0dsc_script
: The DSC Script resource type. Automatically generated from version 2.12.0.0dsc_service
: The DSC Service resource type. Automatically generated from version 2.12.0.0dsc_serviceset
: The DSC resource type. Automatically generated from version 2.12.0.0dsc_user
: The DSC User resource type. Automatically generated from version 2.12.0.0dsc_windowsfeature
: The DSC WindowsFeature resource type. Automatically generated from version 2.12.0.0dsc_windowsfeatureset
: The DSC resource type. Automatically generated from version 2.12.0.0dsc_windowsoptionalfeature
: The DSC WindowsOptionalFeature resource type. Automatically generated from version 2.12.0.0dsc_windowsoptionalfeatureset
: The DSC resource type. Automatically generated from version 2.12.0.0dsc_windowspackagecab
: The DSC WindowsPackageCab resource type. Automatically generated from version 2.12.0.0dsc_windowsprocess
: The DSC WindowsProcess resource type. Automatically generated from version 2.12.0.0
Resource types
dsc_archive
The DSC Archive resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_archive
type.
dsc_checksum
Data type: Optional[Enum['SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate']]
The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present.
Parameters
The following parameters are available in the dsc_archive
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential of a user account with permissions to access the specified archive path and destination if needed.
dsc_destination
namevar
Data type: String
The path where the specified archive file should be expanded to or removed from.
dsc_force
Data type: Optional[Boolean]
Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false.
dsc_path
namevar
Data type: String
The path to the archive file that should be expanded to or removed from the specified destination.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_validate
Data type: Optional[Boolean]
Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false.
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_environment
The DSC Environment resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_environment
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies if the environment varaible should exist.
dsc_path
Data type: Optional[Boolean]
Indicates whether or not the environment variable is the Path variable.
dsc_target
Data type: Optional[Array[Enum['Process', 'Machine']]]
Indicates the target where the environment variable should be set.
dsc_value
Data type: Optional[String]
The desired value for the environment variable.
Parameters
The following parameters are available in the dsc_environment
type.
dsc_name
namevar
Data type: String
The name of the environment variable for which you want to ensure a specific state.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_group
The DSC Group resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_group
type.
dsc_description
Data type: Optional[String]
The description the group should have.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Indicates if the group should exist or not.
dsc_members
Data type: Optional[Array[String]]
The members the group should have.
dsc_memberstoexclude
Data type: Optional[Array[String]]
The members the group should exclude.
dsc_memberstoinclude
Data type: Optional[Array[String]]
The members the group should include.
Parameters
The following parameters are available in the dsc_group
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
A credential to resolve non-local group members.
dsc_groupname
namevar
Data type: String
The name of the group to create, modify, or remove.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_groupset
The DSC resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_groupset
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_ensure
Data type: Optional[String]
dsc_memberstoexclude
Data type: Optional[Array[String]]
dsc_memberstoinclude
Data type: Optional[Array[String]]
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Parameters
The following parameters are available in the dsc_groupset
type.
dsc_groupname
namevar
Data type: Array[String]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_msipackage
The DSC MsiPackage resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_msipackage
type.
dsc_arguments
Data type: Optional[String]
The arguments to be passed to the MSI package during installation or uninstallation.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies whether or not the MSI file should be installed or uninstalled.
dsc_filehash
Data type: Optional[String]
The expected hash value of the MSI file at the given path.
dsc_hashalgorithm
Data type: Optional[Enum['SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5', 'RIPEMD160']]
The algorithm used to generate the given hash value.
dsc_installedon
Data type: Optional[String]
The date that the MSI package was installed on or serviced on, whichever is later.
dsc_installsource
Data type: Optional[String]
The path to the MSI package.
dsc_logpath
Data type: Optional[String]
The path to the log file to log the output from the MSI execution.
dsc_name
Data type: Optional[String]
The display name of the MSI package.
dsc_packagedescription
Data type: Optional[String]
The description of the MSI package.
dsc_path
Data type: String
The path to the MSI file that should be installed or uninstalled.
dsc_publisher
Data type: Optional[String]
The publisher of the MSI package.
dsc_servercertificatevalidationcallback
Data type: Optional[String]
PowerShell code that should be used to validate SSL certificates for paths using HTTPS.
dsc_signersubject
Data type: Optional[String]
The subject that should match the signer certificate of the digital signature of the MSI file.
dsc_signerthumbprint
Data type: Optional[String]
The certificate thumbprint that should match the signer certificate of the digital signature of the MSI file.
dsc_size
Data type: Optional[Integer[0, 4294967295]]
The size of the MSI package in MB.
dsc_version
Data type: Optional[String]
The version number of the MSI package.
Parameters
The following parameters are available in the dsc_msipackage
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential of a user account to be used to mount a UNC path if needed.
dsc_productid
namevar
Data type: String
The identifying number used to find the package, usually a GUID.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_runascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential of a user account under which to run the installation or uninstallation of the MSI package.
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_processset
The DSC resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_processset
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_ensure
Data type: Optional[String]
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_standarderrorpath
Data type: Optional[String]
dsc_standardinputpath
Data type: Optional[String]
dsc_standardoutputpath
Data type: Optional[String]
dsc_workingdirectory
Data type: Optional[String]
Parameters
The following parameters are available in the dsc_processset
type.
dsc_path
namevar
Data type: Array[String]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_registry
The DSC Registry resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_registry
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent.
dsc_hex
Data type: Optional[Boolean]
Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.
dsc_valuedata
Data type: Optional[Array[String]]
The data the specified registry key value should have as a string or an array of strings (MultiString only).
dsc_valuetype
Data type: Optional[Enum['String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString']]
The type the specified registry key value should have.
Parameters
The following parameters are available in the dsc_registry
type.
dsc_force
Data type: Optional[Boolean]
Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.
dsc_key
namevar
Data type: String
The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_valuename
namevar
Data type: String
The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_script
The DSC Script resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_script
type.
dsc_result
Data type: Optional[String]
The result from the GetScript script block.
Parameters
The following parameters are available in the dsc_script
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential of the user account to run the script under if needed.
dsc_getscript
namevar
Data type: String
A string that can be used to create a PowerShell script block that retrieves the current state of the resource.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_setscript
namevar
Data type: String
A string that can be used to create a PowerShell script block that sets the resource to the desired state.
dsc_testscript
namevar
Data type: String
A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state.
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_service
The DSC Service resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_service
type.
dsc_builtinaccount
Data type: Optional[Enum['LocalSystem', 'LocalService', 'NetworkService']]
Indicates the sign-in account to use for the service.
dsc_dependencies
Data type: Optional[Array[String]]
An array of strings indicating the names of the dependencies of the service.
dsc_description
Data type: Optional[String]
The description of the service.
dsc_desktopinteract
Data type: Optional[Boolean]
The service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False.
dsc_displayname
Data type: Optional[String]
The display name of the service.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Ensures that the service is present or absent. Defaults to Present.
dsc_path
Data type: Optional[String]
The path to the service executable file.
dsc_startuptimeout
Data type: Optional[Integer[0, 4294967295]]
The time to wait for the service to start in milliseconds. Defaults to 30000.
dsc_startuptype
Data type: Optional[Enum['Automatic', 'Manual', 'Disabled']]
Indicates the startup type for the service.
dsc_state
Data type: Optional[Enum['Running', 'Stopped', 'Ignore']]
Indicates the state you want to ensure for the service. Defaults to Running.
dsc_terminatetimeout
Data type: Optional[Integer[0, 4294967295]]
The time to wait for the service to stop in milliseconds. Defaults to 30000.
Parameters
The following parameters are available in the dsc_service
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential to run the service under.
dsc_name
namevar
Data type: String
Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_serviceset
The DSC resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_serviceset
type.
dsc_builtinaccount
Data type: Optional[String]
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_ensure
Data type: Optional[String]
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_startuptype
Data type: Optional[String]
dsc_state
Data type: Optional[String]
Parameters
The following parameters are available in the dsc_serviceset
type.
dsc_name
namevar
Data type: Array[String]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_user
The DSC User resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_user
type.
dsc_description
Data type: Optional[String]
A description for the user
dsc_disabled
Data type: Optional[Boolean]
Value used to disable/enable a user account
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
An enumerated value that describes if the user is expected to exist on the machine
dsc_fullname
Data type: Optional[String]
The display name of the user
dsc_passwordchangenotallowed
Data type: Optional[Boolean]
Value used to set whether a user can/cannot change their password
dsc_passwordchangerequired
Data type: Optional[Boolean]
Value used to require a user to change their password
dsc_passwordneverexpires
Data type: Optional[Boolean]
Value used to set whether a user's password expires or not
Parameters
The following parameters are available in the dsc_user
type.
dsc_password
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The password for the user
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_username
namevar
Data type: String
The name of the User to Create/Modify/Delete
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowsfeature
The DSC WindowsFeature resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowsfeature
type.
dsc_displayname
Data type: Optional[String]
The display name of the retrieved role or feature.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies whether the role or feature should be installed or uninstalled. To install the feature, set this property to Present. To uninstall the feature, set the property to Absent.
dsc_includeallsubfeature
Data type: Optional[Boolean]
Specifies whether the subfeatures of the main feature should also be installed.
dsc_logpath
Data type: Optional[String]
The path to the log file to log this operation.
Parameters
The following parameters are available in the dsc_windowsfeature
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
A credential, if needed, to install or uninstall the role or feature.
dsc_name
namevar
Data type: String
The name of the role or feature to install or uninstall.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowsfeatureset
The DSC resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowsfeatureset
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_ensure
Data type: Optional[String]
dsc_includeallsubfeature
Data type: Optional[Boolean]
dsc_logpath
Data type: Optional[String]
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_source
Data type: Optional[String]
Parameters
The following parameters are available in the dsc_windowsfeatureset
type.
dsc_name
namevar
Data type: Array[String]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowsoptionalfeature
The DSC WindowsOptionalFeature resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowsoptionalfeature
type.
dsc_customproperties
Data type: Optional[Array[String]]
The custom properties retrieved from the Windows optional feature as an array of strings.
dsc_description
Data type: Optional[String]
The description retrieved from the Windows optional feature.
dsc_displayname
Data type: Optional[String]
The display name retrieved from the Windows optional feature.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent.
dsc_loglevel
Data type: Optional[Enum['ErrorsOnly', 'ErrorsAndWarning', 'ErrorsAndWarningAndInformation']]
The maximum output level to show in the log. Accepted values are: ErrorsOnly (only errors are logged), ErrorsAndWarning (errors and warnings are logged), and ErrorsAndWarningAndInformation (errors, warnings, and debug information are logged).
dsc_logpath
Data type: Optional[String]
The path to the log file to log this operation.
dsc_nowindowsupdatecheck
Data type: Optional[Boolean]
Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU.
dsc_removefilesondisable
Data type: Optional[Boolean]
Specifies that all files associated with the feature should be removed if the feature is being disabled.
Parameters
The following parameters are available in the dsc_windowsoptionalfeature
type.
dsc_name
namevar
Data type: String
The name of the feature to enable or disable.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowsoptionalfeatureset
The DSC resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowsoptionalfeatureset
type.
dsc_loglevel
Data type: Optional[String]
dsc_logpath
Data type: Optional[String]
dsc_nowindowsupdatecheck
Data type: Optional[Boolean]
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_removefilesondisable
Data type: Optional[Boolean]
Parameters
The following parameters are available in the dsc_windowsoptionalfeatureset
type.
dsc_ensure
namevar
Data type: String
dsc_name
namevar
Data type: Array[String]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowspackagecab
The DSC WindowsPackageCab resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowspackagecab
type.
dsc_ensure
Data type: Enum['Present', 'Absent']
Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent.
dsc_logpath
Data type: Optional[String]
The path to a file to log the operation to.
dsc_sourcepath
Data type: String
The path to the cab file to install or uninstall the package from.
Parameters
The following parameters are available in the dsc_windowspackagecab
type.
dsc_name
namevar
Data type: String
The name of the package to install or uninstall.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_windowsprocess
The DSC WindowsProcess resource type. Automatically generated from version 2.12.0.0
Properties
The following properties are available in the dsc_windowsprocess
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
Indicates whether the process is present (running) or absent (not running).
dsc_handlecount
Data type: Optional[Integer[-2147483648, 2147483647]]
The number of handles opened by the process.
dsc_nonpagedmemorysize
Data type: Optional[Integer[0, 18446744073709551615]]
The amount of nonpaged memory, in bytes, allocated for the process.
dsc_pagedmemorysize
Data type: Optional[Integer[0, 18446744073709551615]]
The amount of paged memory, in bytes, allocated for the process.
dsc_processcount
Data type: Optional[Integer[-2147483648, 2147483647]]
The number of instances of the given process that are currently running.
dsc_processid
Data type: Optional[Integer[-2147483648, 2147483647]]
The unique identifier of the process.
dsc_standarderrorpath
Data type: Optional[String]
The path to write the standard error stream to.
dsc_standardinputpath
Data type: Optional[String]
The path to receive standard input from.
dsc_standardoutputpath
Data type: Optional[String]
The path to write the standard output stream to.
dsc_virtualmemorysize
Data type: Optional[Integer[0, 18446744073709551615]]
The amount of virtual memory, in bytes, allocated for the process.
dsc_workingdirectory
Data type: Optional[String]
The directory to run the processes under.
Parameters
The following parameters are available in the dsc_windowsprocess
type.
dsc_arguments
namevar
Data type: String
A string of arguments to pass to the process executable. Pass in an empty string if no arguments are needed.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential to run the process under.
dsc_path
namevar
Data type: String
The full path or file name to the process executable to start or stop.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
name
namevar
Data type: String
Description of the purpose for this resource declaration.
Change log for PsDscResources
Unreleased
2.12.0.0
- Ports style fixes that were recently made in xPSDesiredStateConfiguration on test related files.
- Ports most of the style upgrades from xPSDesiredStateConfiguration that have been made in files in the DscResources folder.
- Ports fixes for the following issues: Issue #505 Issue #590 Changes to test helper Enter-DscResourceTestEnvironment so that it only updates DSCResource.Tests when it is longer than 120 minutes since it was last pulled. This is to improve performance of test execution and reduce the likelihood of connectivity issues caused by inability to pull DSCResource.Tests.
- Fixes issue where MsiPackage Integration tests fail if the test HttpListener fails to start. Moves the test HttpListener objects to dynamically assigned, higher numbered ports to avoid conflicts with other services, and also checks to ensure that the ports are available before using them. Adds checks to ensure that no outstanding HTTP server jobs are running before attempting to setup a new one. Also adds additional instrumentation to make it easier to troubleshoot issues with the test HttpListener objects in the future. Specifically fixes Issue #142
- Improved speed of Test-IsNanoServer function
- Remove the Byte Order Mark (BOM) from all affected files
- Opt-in to 'Validate Module Files' and 'Validate Script Files' common meta-tests
- Opt-in to 'Common Tests - Relative Path Length' common meta-test
- Fix README markdownlint validation failures
- Move change log from README.md to CHANGELOG.md
2.11.0.0
- Fix Custom DSC Resource Kit PSSA Rule Failures
2.10.0.0
- Fixed CompanyName typo - Fixes Issue #100
- Update LICENSE file to match the Microsoft Open Source Team standard - Fixes Issue #120.
- Update
CommonResourceHelper
unit tests to meet Pester 4.0.0 standards (issue #129). - Update
ResourceHelper
unit tests to meet Pester 4.0.0 standards (issue #129). - Ported fixes from xPSDesiredStateConfiguration:
- xArchive
- Fix end-to-end tests.
- Update integration tests to meet Pester 4.0.0 standards.
- Update end-to-end tests to meet Pester 4.0.0 standards.
- Update unit and integration tests to meet Pester 4.0.0 standards.
- Wrapped all path and identifier strings in verbose messages with quotes to make it easier to identify the limit of the string when debugging.
- Refactored date/time checksum code to improve testability and ensure tests can run on machines with localized datetime formats that are not US.
- Fix 'Get-ArchiveEntryLastWriteTime' to return
[datetime]
. - Improved verbose logging to make debugging path issues easier.
- xArchive
- Added .gitattributes file to ensure CRLF settings are configured correctly for the repository.
- Updated '.vscode\settings.json' to refer to AnalyzerSettings.psd1 so that custom syntax problems are highlighted in Visual Studio Code.
- Fixed style guideline violations in
CommonResourceHelper.psm1
. - Updated 'appveyor.yml' to meet more recent standards.
- Removed OS image version from 'appveyor.yml' to use default image (Issue #127).
- Removed code to install WMF5.1 from 'appveyor.yml' because it is already installed in AppVeyor images (Issue #128).
- Removed .vscode from .gitignore so that Visual Studio code environment settings can be committed.
- Environment
- Update tests to meet Pester 4.0.0 standards (issue #129).
- Group
- Update tests to meet Pester 4.0.0 standards (issue #129).
- Fix unit tests to run on Nano Server.
- Refactored unit tests to enclude Context fixtures and change functions to Describe fixtures.
- GroupSet
- Update tests to meet Pester 4.0.0 standards (issue #129).
2.9.0.0
- Added Description and Parameter description for composite resources
2.8.0.0
- Archive
- Added handling of directory archive entries that end with a foward slash
- Removed formatting of LastWriteTime timestamp and updated comparison of timestamps to handle dates in different formats
- WindowsProcess
- Fix unreliable tests
- Updated Test-IsNanoServer to return false if Get-ComputerInfo fails
- Registry
- Fixed bug when using the full registry drive name (e.g. HKEY_LOCAL_MACHINE) and using a key name that includes a drive with forward slashes (e.g. C:/)
2.7.0.0
- MsiPackage
- Parse installation date from registry using invariant culture.
- Fix a bug in unit test failing, when regional setting differs from English-US.
2.6.0.0
- Archive
- Fixed a minor bug in the unit tests where sometimes the incorrect DateTime format was used.
- Added MsiPackage
2.5.0.0
- Enable codecov.io code coverage reporting
- Group
- Added support for domain based group members on Nano server.
- Added the Archive resource
- Update Test-IsNanoServer cmdlet to properly test for a Nano server rather than the core version of PowerShell
- Registry
- Fixed bug where an error was thrown when running Get-DscConfiguration if the registry already existed
2.4.0.0
- Cleaned User
- Updated User to have non-dependent unit tests.
- Ported fixes from xPSDesiredStateConfiguration:
- WindowsProcess: Minor updates to integration tests
- Registry: Fixed support for forward slashes in registry key names
- Group:
- Group members in the "NT Authority", "BuiltIn" and "NT Service" scopes should now be resolved without an error. If you were seeing the errors "Exception calling ".ctor" with "4" argument(s): "Server names cannot contain a space character."" or "Exception calling ".ctor" with "2" argument(s): "Server names cannot contain a space character."", this fix should resolve those errors. If you are still seeing one of the errors, there is probably another local scope we need to add. Please let us know.
- The resource will no longer attempt to resolve group members if Members, MembersToInclude, and MembersToExclude are not specified.
- Added Environment
2.3.0.0
- Updated manifest to include both WindowsOptionalFeature and WindowsOptionalFeatureSet instead of just WindowsOptionalFeature twice
2.2.0.0
- WindowsFeature:
- Added Catch to ignore RuntimeException when importing ServerManager module. This solves the issue described here.
- Updated unit tests.
- Added WindowsProcess
- CommonTestHelper:
- Added Get-AppVeyorAdministratorCredential.
- Added Set-StrictMode -'Latest' and $errorActionPreference -'Stop'.
- Service:
- Updated resource module, unit tests, integration tests, and examples to reflect the changes made in xPSDesiredStateConfiguration.
- Group:
- Updated resource module, examples, and integration tests to reflect the changes made in xPSDesiredStateConfiguration.
- Added Script.
- Added GroupSet, ServiceSet, WindowsFeatureSet, WindowsOptionalFeatureSet, and ProcessSet.
- Added Set-StrictMode -'Latest' and $errorActionPreference -'Stop' to Group, Service, User, WindowsFeature, WindowsOptionalFeature, WindowsPackageCab.
- Fixed bug in WindowsFeature in which is was checking the 'Count' property of an object that was not always an array.
- Cleaned Group and Service resources and tests.
- Added Registry.
2.1.0.0
- Added WindowsFeature.
2.0.0.0
- Initial release of PSDscResources.
Dependencies
- puppetlabs/pwshlib (>= 0.7.0 < 2.0.0)