securitypolicydsc
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
Start using this module
Add this module to your Puppetfile:
mod 'dsc-securitypolicydsc', '2.10.0-0-9'
Learn more about managing modules with a PuppetfileDocumentation
securitypolicydsc
Table of Contents
Description
This is an auto-generated module, using the Puppet DSC Builder to vendor and expose the securitypolicydsc 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.10.0.0. The PowerShell module describes itself like this:
This module is a wrapper around secedit.exe which provides the ability to configure user rights assignments
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!
Long File Path Support
Several PowerShell modules with DSC Resources end up with very long file paths once vendored, many of which exceed the 260 character limit for file paths. Luckily in Windows 10 (build 1607+), Windows Server 2016 (build 1607+), and Windows Server 2019 there is now an option for supporting long file paths transparently!
We strongly recommend enabling long file path support on any machines using this module to avoid path length issues.
You can set this value using the Puppet registry_value
resource:
registry_value { 'HKLM\System\CurrentControlSet\Control\FileSystem\LongPathsEnabled':
ensure => 'present',
data => [1],
provider => 'registry',
type => 'dword',
}
You can also set this value outside of Puppet by following the Microsoft documentation.
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,
}
Credentials
Credentials are always specified as a hash of the username and password for the account. The password must use the Puppet Sensitive type; this ensures that logs and reports redact the password, displaying it instead as <Sensitive [value redacted]>.
dsc_psrepository { 'PowerShell Gallery':
dsc_name => 'psgAllery',
dsc_installationpolicy => 'Trusted',
dsc_psdscrunascredential => {
user => 'apple',
password => Sensitive('foobar'),
},
}
Class-Based Resources
Class-based DSC Resources can be used like any other DSC Resource in this module, with one important note:
Due to a bug in calling class-based DSC Resources by path instead of module name, each call to Invoke-DscResource
needs to temporarily munge the system-level environment variable for PSModulePath
;
the variable is reset prior to the end of each invocation.
CIM Instances
Because the CIM instances for DSC resources are fully mapped, the types actually explain fairly precisely what the shape of each CIM instance has to be - and, moreover, the type definition means that you get checking at catalog compile time. Puppet parses CIM instances are structured hashes (or arrays of structured hashes) that explicitly declare their keys and the valid types of values for each key.
So, for the dsc_accesscontrolentry
property of the dsc_ntfsaccessentry
type, which has a MOF type of NTFSAccessControlList[]
, Puppet defines the CIM instance as:
Array[Struct[{
accesscontrolentry => Array[Struct[{
accesscontroltype => Enum['Allow', 'Deny'],
inheritance => Enum['This folder only', 'This folder subfolders and files', 'This folder and subfolders', 'This folder and files', 'Subfolders and files only', 'Subfolders only', 'Files only'],
ensure => Enum['Present', 'Absent'],
cim_instance_type => 'NTFSAccessControlEntry',
filesystemrights => Array[Enum['AppendData', 'ChangePermissions', 'CreateDirectories', 'CreateFiles', 'Delete', 'DeleteSubdirectoriesAndFiles', 'ExecuteFile', 'FullControl', 'ListDirectory', 'Modify', 'Read', 'ReadAndExecute', 'ReadAttributes', 'ReadData', 'ReadExtendedAttributes', 'ReadPermissions', 'Synchronize', 'TakeOwnership', 'Traverse', 'Write', 'WriteAttributes', 'WriteData', 'WriteExtendedAttributes']]
}]],
forceprincipal => Optional[Boolean],
principal => Optional[String],
}]]
A valid example of that in a puppet manifest looks like this:
dsc_accesscontrollist => [
{
accesscontrolentry => [
{
accesscontroltype => 'Allow',
inheritance => 'This folder only',
ensure => 'Present',
filesystemrights => 'ChangePermissions',
cim_instance_type => 'NTFSAccessControlEntry',
},
],
principal => 'veryRealUserName',
},
]
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).
Validation Mode
By default, these resources use the property validation mode, which checks whether or not the resource is in the desired state the same way most Puppet resources are validated;
by comparing the properties returned from the system with those specified in the manifest.
Sometimes, however, this is insufficient;
many DSC Resources return data that does not compare properly to the desired state (some are missing properties, others are malformed, some simply cannot be strictly compared).
In these cases, you can set the validation mode to resource
, which falls back on calling Invoke-DscResource
with the Test
method and trusts that result.
When using the resource
validation mode, the resource is tested once and will then treat all properties of that resource as in sync (if the result returned true
) or not in sync.
This loses the granularity of change reporting for the resource but prevents flapping and unexpected behavior.
# This will flap because the DSC resource never returns name in SecurityPolicyDsc v2.10.0.0
dsc_securityoption { 'Enforce Anonoymous SID Translation':
dsc_name => 'Enforce Anonymous SID Translation',
dsc_network_access_allow_anonymous_sid_name_translation => 'Disabled',
}
# This will idempotently apply
dsc_psrepository { 'PowerShell Gallery':
validation_mode => 'resource',
dsc_name => 'Enforce Anonymous SID Translation',
dsc_network_access_allow_anonymous_sid_name_translation => 'Disabled',
}
It is important to note that this feature is only supported with a version of puppetlabs-pwshlib
equal to or higher than 0.9.0
, in which the supporting code for the DSC Base Provider to implement custom insync was shipped.
Finally, while this module's metadata says that the supported Puppet versions are 6.0.0 and up, the implementation of the validation_mode
parameter relies on the custom_insync
feature of the Puppet Resource API.
The custom_insync
feature first shipped in the puppet-resource_api
version 1.8.14
, which itself is only included in Puppet versions equal to or newer than 6.23.0
and 7.8.0
for the 6x and 7x platforms respectively.
Using this module against older Puppet versions will result in a warning (example below) and only use the default property-by-property change reporting, regardless of the setting of validation_mode
.
Warning: Unknown feature detected: ["custom_insync"]
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.
Right now, if you have the same version of a PowerShell module with class-based DSC Resources in your PSModulePath as vendored in a Puppetized DSC Module, you cannot use those class-based DSC Resources from inside of Puppet due to a bug in DSC which prevents using a module by path reference instead of name. Instead, DSC will see that there are two DSC Resources for the same module and version and then error out.
Configuring the LCM
In order for a Puppetized DSC module to function, the DSC Local Configuration Manager (LCM) RefreshMode
must be set to either Push
or Disabled
.
The default value for RefreshMode
in WMF 5.0 and WMF 5.1 is Push
- so if it has not been set to anything else then there is no action needed on your part.
However if the value of the LCM has been set to anything other than Push
then the module will not function and so the value must either be changed back or disabled.
The Puppetized DSC modules use the Invoke-DscResource
cmdlet to invoke DSC Resources of the target machine.
If the RefreshMode
is set to Pull
, DSC Resources will only run from a DSC Pull Server - in this setting DSC does not allow any DSC Resources to be run interactively on the host.
Module Installation
If you're using this module with Puppet Enterprise and Code Manager, everything should "just work" - no errors or issues acquiring and deploying this or any Puppetized DSC module to nodes.
Unfortunately, due a bug in minitar which prevents it from unpacking archives with long file paths, both r10k
and serverless Puppet (via puppet module install
) methods of installing modules with long path names will fail.
In short, minitar is unable to unpack modules that contain long file paths (though it can create them).
As a workaround, you can retrieve DSC modules from the forge via PowerShell and 7zip:
$ModuleAuthor = 'dsc'
$ModuleName = 'xremotedesktopsessionhost'
$ModuleVersion = '2.0.0-0-1'
$ArchiveFileName = "$ModuleAuthor-$ModuleName-$ModuleVersion.tar.gz"
$DownloadUri = "https://forge.puppet.com/v3/files/$ArchiveFileName"
# Download the module tar.gz to the current directory
Invoke-WebRequest -Uri $DownloadUri -OutFile ./$ArchiveFileName
# Use 7zip to extract the module to the current directory
& 7z x $ArchiveFileName -so | & 7z x -aoa -si -ttar
Reference
Table of Contents
Resource types
dsc_accountpolicy
: The DSC AccountPolicy resource type. Automatically generated from version 2.10.0.0dsc_securityoption
: The DSC SecurityOption resource type. Automatically generated from version 2.10.0.0dsc_securitytemplate
: The DSC SecurityTemplate resource type. Automatically generated from version 2.10.0.0dsc_userrightsassignment
: The DSC UserRightsAssignment resource type. Automatically generated from version 2.10.0.0
Resource types
dsc_accountpolicy
The DSC AccountPolicy resource type. Automatically generated from version 2.10.0.0
Properties
The following properties are available in the dsc_accountpolicy
type.
dsc_account_lockout_duration
Data type: Optional[Integer[0, 4294967295]]
dsc_account_lockout_threshold
Data type: Optional[Integer[0, 4294967295]]
dsc_enforce_password_history
Data type: Optional[Integer[0, 4294967295]]
dsc_enforce_user_logon_restrictions
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_maximum_lifetime_for_service_ticket
Data type: Optional[Integer[0, 4294967295]]
dsc_maximum_lifetime_for_user_ticket
Data type: Optional[Integer[0, 4294967295]]
dsc_maximum_lifetime_for_user_ticket_renewal
Data type: Optional[Integer[0, 4294967295]]
dsc_maximum_password_age
Data type: Optional[Integer[0, 4294967295]]
dsc_maximum_tolerance_for_computer_clock_synchronization
Data type: Optional[Integer[0, 4294967295]]
dsc_minimum_password_age
Data type: Optional[Integer[0, 4294967295]]
dsc_minimum_password_length
Data type: Optional[Integer[0, 4294967295]]
dsc_password_must_meet_complexity_requirements
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_reset_account_lockout_counter_after
Data type: Optional[Integer[0, 4294967295]]
dsc_store_passwords_using_reversible_encryption
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
ensurable
Data type: Boolean[false]
Default attribute added to all dsc types without an ensure property. This resource is not ensurable.
Parameters
The following parameters are available in the dsc_accountpolicy
type.
dsc_name
namevar
Data type: String
A unique name of the AccountPolicy resource instance. This is not used during configuration.
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.
validation_mode
Data type: Enum[property, resource]
Whether to check if the resource is in the desired state by property (default) or using Invoke-DscResource in Test mode (resource).
Default value: property
dsc_securityoption
The DSC SecurityOption resource type. Automatically generated from version 2.10.0.0
Properties
The following properties are available in the dsc_securityoption
type.
dsc_accounts_administrator_account_status
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_accounts_block_microsoft_accounts
Data type: Optional[Enum['This policy is disabled', 'this policy is disabled', 'Users cant add Microsoft accounts', 'users cant add microsoft accounts', 'Users cant add or log on with Microsoft accounts', 'users cant add or log on with microsoft accounts']]
dsc_accounts_guest_account_status
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_accounts_limit_local_account_use_of_blank_passwords_to_console_logon_only
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_accounts_rename_administrator_account
Data type: Optional[String]
dsc_accounts_rename_guest_account
Data type: Optional[String]
dsc_audit_audit_the_access_of_global_system_objects
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_audit_audit_the_use_of_backup_and_restore_privilege
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_audit_force_audit_policy_subcategory_settings_windows_vista_or_later_to_override_audit_policy_category_settings
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_audit_shut_down_system_immediately_if_unable_to_log_security_audits
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_dcom_machine_access_restrictions_in_security_descriptor_definition_language_sddl_syntax
Data type: Optional[String]
dsc_dcom_machine_launch_restrictions_in_security_descriptor_definition_language_sddl_syntax
Data type: Optional[String]
dsc_devices_allow_undock_without_having_to_log_on
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_devices_allowed_to_format_and_eject_removable_media
Data type: Optional[Enum['Administrators', 'administrators', 'Administrators and Power Users', 'administrators and power users', 'Administrators and Interactive Users', 'administrators and interactive users']]
dsc_devices_prevent_users_from_installing_printer_drivers
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_devices_restrict_cd_rom_access_to_locally_logged_on_user_only
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_devices_restrict_floppy_access_to_locally_logged_on_user_only
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_controller_allow_server_operators_to_schedule_tasks
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_controller_ldap_server_signing_requirements
Data type: Optional[Enum['None', 'none', 'Require Signing', 'require signing']]
dsc_domain_controller_refuse_machine_account_password_changes
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_member_digitally_encrypt_or_sign_secure_channel_data_always
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_member_digitally_encrypt_secure_channel_data_when_possible
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_member_digitally_sign_secure_channel_data_when_possible
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_member_disable_machine_account_password_changes
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_domain_member_maximum_machine_account_password_age
Data type: Optional[String]
dsc_domain_member_require_strong_windows_2000_or_later_session_key
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_interactive_logon_display_user_information_when_the_session_is_locked
Data type: Optional[Enum['User displayname, domain and user names', 'user displayname, domain and user names', 'User display name only', 'user display name only', 'Do not display user information', 'do not display user information']]
dsc_interactive_logon_do_not_display_last_user_name
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_interactive_logon_do_not_require_ctrl_alt_del
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_interactive_logon_machine_account_lockout_threshold
Data type: Optional[String]
dsc_interactive_logon_machine_inactivity_limit
Data type: Optional[String]
dsc_interactive_logon_message_text_for_users_attempting_to_log_on
Data type: Optional[String]
dsc_interactive_logon_message_title_for_users_attempting_to_log_on
Data type: Optional[String]
dsc_interactive_logon_number_of_previous_logons_to_cache_in_case_domain_controller_is_not_available
Data type: Optional[String]
dsc_interactive_logon_prompt_user_to_change_password_before_expiration
Data type: Optional[String]
dsc_interactive_logon_require_domain_controller_authentication_to_unlock_workstation
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_interactive_logon_require_smart_card
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_interactive_logon_smart_card_removal_behavior
Data type: Optional[Enum['No Action', 'no action', 'Lock workstation', 'lock workstation', 'Force logoff', 'force logoff', 'Disconnect if a remote Remote Desktop Services session', 'disconnect if a remote remote desktop services session']]
dsc_microsoft_network_client_digitally_sign_communications_always
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_client_digitally_sign_communications_if_server_agrees
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_client_send_unencrypted_password_to_third_party_smb_servers
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_server_amount_of_idle_time_required_before_suspending_session
Data type: Optional[String]
dsc_microsoft_network_server_attempt_s4u2self_to_obtain_claim_information
Data type: Optional[Enum['Default', 'default', 'Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_server_digitally_sign_communications_always
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_server_digitally_sign_communications_if_client_agrees
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_server_disconnect_clients_when_logon_hours_expire
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_microsoft_network_server_server_spn_target_name_validation_level
Data type: Optional[Enum['Off', 'off', 'Accept if provided by client', 'accept if provided by client', 'Required from client', 'required from client']]
dsc_network_access_allow_anonymous_sid_name_translation
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_do_not_allow_anonymous_enumeration_of_sam_accounts
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_do_not_allow_anonymous_enumeration_of_sam_accounts_and_shares
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_do_not_allow_storage_of_passwords_and_credentials_for_network_authentication
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_let_everyone_permissions_apply_to_anonymous_users
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_named_pipes_that_can_be_accessed_anonymously
Data type: Optional[String]
dsc_network_access_remotely_accessible_registry_paths
Data type: Optional[String]
dsc_network_access_remotely_accessible_registry_paths_and_subpaths
Data type: Optional[String]
dsc_network_access_restrict_anonymous_access_to_named_pipes_and_shares
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_access_restrict_clients_allowed_to_make_remote_calls_to_sam
Data type: Optional[Array[Struct[{ permission => Optional[Enum['Allow', 'allow', 'Deny', 'deny']], identity => Optional[String] }]]]
The Permission and Identity required for restricted remote Sam access
dsc_network_access_shares_that_can_be_accessed_anonymously
Data type: Optional[String]
dsc_network_access_sharing_and_security_model_for_local_accounts
Data type: Optional[Enum['Classic - Local users authenticate as themselves', 'classic - local users authenticate as themselves', 'Guest only - Local users authenticate as Guest', 'guest only - local users authenticate as guest']]
dsc_network_security_allow_local_system_to_use_computer_identity_for_ntlm
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_security_allow_localsystem_null_session_fallback
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_security_allow_pku2u_authentication_requests_to_this_computer_to_use_online_identities
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_security_configure_encryption_types_allowed_for_kerberos
Data type: Optional[Array[Enum['DES_CBC_CRC', 'des_cbc_crc', 'DES_CBC_MD5', 'des_cbc_md5', 'RC4_HMAC_MD5', 'rc4_hmac_md5', 'AES128_HMAC_SHA1', 'aes128_hmac_sha1', 'AES256_HMAC_SHA1', 'aes256_hmac_sha1', 'FUTURE', 'future']]]
dsc_network_security_do_not_store_lan_manager_hash_value_on_next_password_change
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_security_force_logoff_when_logon_hours_expire
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_network_security_lan_manager_authentication_level
Data type: Optional[Enum['Send LM & NTLM responses', 'send lm & ntlm responses', 'Send LM & NTLM - use NTLMv2 session security if negotiated', 'send lm & ntlm - use ntlmv2 session security if negotiated', 'Send NTLM responses only', 'send ntlm responses only', 'Send NTLMv2 responses only', 'send ntlmv2 responses only', 'Send NTLMv2 responses only. Refuse LM', 'send ntlmv2 responses only. refuse lm', 'Send NTLMv2 responses only. Refuse LM & NTLM', 'send ntlmv2 responses only. refuse lm & ntlm']]
dsc_network_security_ldap_client_signing_requirements
Data type: Optional[Enum['None', 'none', 'Negotiate Signing', 'negotiate signing', 'Require Signing', 'require signing']]
dsc_network_security_minimum_session_security_for_ntlm_ssp_based_including_secure_rpc_clients
Data type: Optional[Enum['Require NTLMv2 session security', 'require ntlmv2 session security', 'Require 128-bit encryption', 'require 128-bit encryption', 'Both options checked', 'both options checked']]
dsc_network_security_minimum_session_security_for_ntlm_ssp_based_including_secure_rpc_servers
Data type: Optional[Enum['Require NTLMv2 session security', 'require ntlmv2 session security', 'Require 128-bit encryption', 'require 128-bit encryption', 'Both options checked', 'both options checked']]
dsc_network_security_restrict_ntlm_add_remote_server_exceptions_for_ntlm_authentication
Data type: Optional[String]
dsc_network_security_restrict_ntlm_add_server_exceptions_in_this_domain
Data type: Optional[String]
dsc_network_security_restrict_ntlm_audit_incoming_ntlm_traffic
Data type: Optional[Enum['Disabled', 'disabled', 'Enable auditing for domain accounts', 'enable auditing for domain accounts', 'Enable auditing for all accounts', 'enable auditing for all accounts']]
dsc_network_security_restrict_ntlm_audit_ntlm_authentication_in_this_domain
Data type: Optional[Enum['Disable', 'disable', 'Enable for domain accounts to domain servers', 'enable for domain accounts to domain servers', 'Enable for domain accounts', 'enable for domain accounts', 'Enable for domain servers', 'enable for domain servers', 'Enable all', 'enable all']]
dsc_network_security_restrict_ntlm_incoming_ntlm_traffic
Data type: Optional[Enum['Allow all', 'allow all', 'Deny all domain accounts', 'deny all domain accounts', 'Deny all accounts', 'deny all accounts']]
dsc_network_security_restrict_ntlm_ntlm_authentication_in_this_domain
Data type: Optional[Enum['Disable', 'disable', 'Deny for domain accounts to domain servers', 'deny for domain accounts to domain servers', 'Deny for domain accounts', 'deny for domain accounts', 'Deny for domain servers', 'deny for domain servers', 'Deny all', 'deny all']]
dsc_network_security_restrict_ntlm_outgoing_ntlm_traffic_to_remote_servers
Data type: Optional[Enum['Allow all', 'allow all', 'Audit all', 'audit all', 'Deny all', 'deny all']]
dsc_recovery_console_allow_automatic_administrative_logon
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_recovery_console_allow_floppy_copy_and_access_to_all_drives_and_folders
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_shutdown_allow_system_to_be_shut_down_without_having_to_log_on
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_shutdown_clear_virtual_memory_pagefile
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_system_cryptography_force_strong_key_protection_for_user_keys_stored_on_the_computer
Data type: Optional[Enum['User input is not required when new keys are stored and used', 'user input is not required when new keys are stored and used', 'User is prompted when the key is first used', 'user is prompted when the key is first used', 'User must enter a password each time they use a key', 'user must enter a password each time they use a key']]
dsc_system_cryptography_use_fips_compliant_algorithms_for_encryption_hashing_and_signing
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_system_objects_require_case_insensitivity_for_non_windows_subsystems
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_system_objects_strengthen_default_permissions_of_internal_system_objects_eg_symbolic_links
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_system_settings_optional_subsystems
Data type: Optional[String]
dsc_system_settings_use_certificate_rules_on_windows_executables_for_software_restriction_policies
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_admin_approval_mode_for_the_built_in_administrator_account
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_allow_uiaccess_applications_to_prompt_for_elevation_without_using_the_secure_desktop
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_behavior_of_the_elevation_prompt_for_administrators_in_admin_approval_mode
Data type: Optional[Enum['Elevate without prompting', 'elevate without prompting', 'Prompt for credentials on the secure desktop', 'prompt for credentials on the secure desktop', 'Prompt for consent on the secure desktop', 'prompt for consent on the secure desktop', 'Prompt for credentials', 'prompt for credentials', 'Prompt for consent', 'prompt for consent', 'Prompt for consent for non-Windows binaries', 'prompt for consent for non-windows binaries']]
dsc_user_account_control_behavior_of_the_elevation_prompt_for_standard_users
Data type: Optional[Enum['Automatically deny elevation request', 'automatically deny elevation request', 'Prompt for credentials on the secure desktop', 'prompt for credentials on the secure desktop', 'Prompt for credentials', 'prompt for credentials']]
dsc_user_account_control_detect_application_installations_and_prompt_for_elevation
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_only_elevate_executables_that_are_signed_and_validated
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_only_elevate_uiaccess_applications_that_are_installed_in_secure_locations
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_run_all_administrators_in_admin_approval_mode
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_switch_to_the_secure_desktop_when_prompting_for_elevation
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
dsc_user_account_control_virtualize_file_and_registry_write_failures_to_per_user_locations
Data type: Optional[Enum['Enabled', 'enabled', 'Disabled', 'disabled']]
ensurable
Data type: Boolean[false]
Default attribute added to all dsc types without an ensure property. This resource is not ensurable.
Parameters
The following parameters are available in the dsc_securityoption
type.
dsc_name
namevar
Data type: String
Describes the security option to be managed. This could be anything as long as it is unique
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.
validation_mode
Data type: Enum[property, resource]
Whether to check if the resource is in the desired state by property (default) or using Invoke-DscResource in Test mode (resource).
Default value: property
dsc_securitytemplate
The DSC SecurityTemplate resource type. Automatically generated from version 2.10.0.0
Properties
The following properties are available in the dsc_securitytemplate
type.
dsc_path
Data type: String
The path to the desired security policy template (.inf)
ensurable
Data type: Boolean[false]
Default attribute added to all dsc types without an ensure property. This resource is not ensurable.
Parameters
The following parameters are available in the dsc_securitytemplate
type.
dsc_issingleinstance
namevar
Data type: Enum['Yes', 'yes']
Specifies the resource is a single instance, the value must be 'Yes'
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.
validation_mode
Data type: Enum[property, resource]
Whether to check if the resource is in the desired state by property (default) or using Invoke-DscResource in Test mode (resource).
Default value: property
dsc_userrightsassignment
The DSC UserRightsAssignment resource type. Automatically generated from version 2.10.0.0
Properties
The following properties are available in the dsc_userrightsassignment
type.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Desired state of resource.
dsc_identity
Data type: Array[String]
The identity of the user or group to be added or removed from the user rights assignment.
Parameters
The following parameters are available in the dsc_userrightsassignment
type.
dsc_force
Data type: Optional[Boolean]
Specifies whether to Force the change
dsc_policy
namevar
Data type: Enum['Create_a_token_object', 'create_a_token_object', 'Access_this_computer_from_the_network', 'access_this_computer_from_the_network', 'Change_the_system_time', 'change_the_system_time', 'Deny_log_on_as_a_batch_job', 'deny_log_on_as_a_batch_job', 'Deny_log_on_through_Remote_Desktop_Services', 'deny_log_on_through_remote_desktop_services', 'Create_global_objects', 'create_global_objects', 'Remove_computer_from_docking_station', 'remove_computer_from_docking_station', 'Deny_access_to_this_computer_from_the_network', 'deny_access_to_this_computer_from_the_network', 'Act_as_part_of_the_operating_system', 'act_as_part_of_the_operating_system', 'Modify_firmware_environment_values', 'modify_firmware_environment_values', 'Deny_log_on_locally', 'deny_log_on_locally', 'Access_Credential_Manager_as_a_trusted_caller', 'access_credential_manager_as_a_trusted_caller', 'Restore_files_and_directories', 'restore_files_and_directories', 'Change_the_time_zone', 'change_the_time_zone', 'Replace_a_process_level_token', 'replace_a_process_level_token', 'Manage_auditing_and_security_log', 'manage_auditing_and_security_log', 'Create_symbolic_links', 'create_symbolic_links', 'Modify_an_object_label', 'modify_an_object_label', 'Enable_computer_and_user_accounts_to_be_trusted_for_delegation', 'enable_computer_and_user_accounts_to_be_trusted_for_delegation', 'Generate_security_audits', 'generate_security_audits', 'Increase_a_process_working_set', 'increase_a_process_working_set', 'Take_ownership_of_files_or_other_objects', 'take_ownership_of_files_or_other_objects', 'Bypass_traverse_checking', 'bypass_traverse_checking', 'Log_on_as_a_service', 'log_on_as_a_service', 'Shut_down_the_system', 'shut_down_the_system', 'Lock_pages_in_memory', 'lock_pages_in_memory', 'Impersonate_a_client_after_authentication', 'impersonate_a_client_after_authentication', 'Profile_system_performance', 'profile_system_performance', 'Debug_programs', 'debug_programs', 'Profile_single_process', 'profile_single_process', 'Allow_log_on_through_Remote_Desktop_Services', 'allow_log_on_through_remote_desktop_services', 'Allow_log_on_locally', 'allow_log_on_locally', 'Increase_scheduling_priority', 'increase_scheduling_priority', 'Synchronize_directory_service_data', 'synchronize_directory_service_data', 'Add_workstations_to_domain', 'add_workstations_to_domain', 'Adjust_memory_quotas_for_a_process', 'adjust_memory_quotas_for_a_process', 'Obtain_an_impersonation_token_for_another_user_in_the_same_session', 'obtain_an_impersonation_token_for_another_user_in_the_same_session', 'Perform_volume_maintenance_tasks', 'perform_volume_maintenance_tasks', 'Load_and_unload_device_drivers', 'load_and_unload_device_drivers', 'Force_shutdown_from_a_remote_system', 'force_shutdown_from_a_remote_system', 'Back_up_files_and_directories', 'back_up_files_and_directories', 'Create_a_pagefile', 'create_a_pagefile', 'Deny_log_on_as_a_service', 'deny_log_on_as_a_service', 'Log_on_as_a_batch_job', 'log_on_as_a_batch_job', 'Create_permanent_shared_objects', 'create_permanent_shared_objects']
The policy name of the user rights assignment to be configured.
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.
validation_mode
Data type: Enum[property, resource]
Whether to check if the resource is in the desired state by property (default) or using Invoke-DscResource in Test mode (resource).
Default value: property
- Changes to SecurityPolicyDsc
- Opt-in to the following DSC Resource Common Meta Tests:
- Common Tests - Validate Module Files
- Common Tests - Validate Script Files
- Common Tests - Validate Markdown Files
- Common Tests - Required Script Analyzer Rules
- Common Tests - Flagged Script Analyzer Rules
- Common Tests - New Error-Level Script Analyzer Rules
- Common Tests - Custom Script Analyzer Rules
- Common Tests - Validate Markdown Links
- Common Tests - Relative Path Length
- Common Tests - Validate Example Files
- Common Tests - Validate Example Files To Be Published
- Fix keywords to lower-case to align with guideline.
- Opt-in to the following DSC Resource Common Meta Tests:
Dependencies
- puppetlabs/pwshlib (>= 0.9.0 < 2.0.0)