activedirectorydsc
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-activedirectorydsc', '6.6.0-0-0'
Learn more about managing modules with a PuppetfileDocumentation
activedirectorydsc
Table of Contents
Description
This is an auto-generated module, using the Puppet DSC Builder to vendor and expose the ActiveDirectoryDsc PowerShell module's DSC resources as Puppet resources. The functionality of this module comes entirely from the vendored PowerShell resources, which are pinned at v6.6.0. The PowerShell module describes itself like this:
_The ActiveDirectoryDsc module contains DSC resources for deployment and configuration of Active Directory.
These DSC resources allow you to configure new domains, child domains, and high availability domain controllers, establish cross-domain trusts and manage users, groups and OUs._
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.
-
When PowerShell Script Block Logging is enabled, data marked as sensitive in your manifest may appear in these logs as plain text. It is highly recommended, by both Puppet and Microsoft, that you also enable Protected Event Logging alongside this to encrypt the logs to protect this information.
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_adcomputer
: The DSC ADComputer resource type. Automatically generated from version 6.6.0dsc_addomain
: The DSC ADDomain resource type. Automatically generated from version 6.6.0dsc_addomaincontroller
: The DSC ADDomainController resource type. Automatically generated from version 6.6.0dsc_addomaincontrollerproperties
: The DSC ADDomainControllerProperties resource type. Automatically generated from version 6.6.0dsc_addomaindefaultpasswordpolicy
: The DSC ADDomainDefaultPasswordPolicy resource type. Automatically generated from version 6.6.0dsc_addomainfunctionallevel
: The DSC ADDomainFunctionalLevel resource type. Automatically generated from version 6.6.0dsc_addomaintrust
: The DSC ADDomainTrust resource type. Automatically generated from version 6.6.0dsc_adfinegrainedpasswordpolicy
: The DSC ADFineGrainedPasswordPolicy resource type. Automatically generated from version 6.6.0dsc_adforestfunctionallevel
: The DSC ADForestFunctionalLevel resource type. Automatically generated from version 6.6.0dsc_adforestproperties
: The DSC ADForestProperties resource type. Automatically generated from version 6.6.0dsc_adgroup
: The DSC ADGroup resource type. Automatically generated from version 6.6.0dsc_adkdskey
: The DSC ADKDSKey resource type. Automatically generated from version 6.6.0dsc_admanagedserviceaccount
: The DSC ADManagedServiceAccount resource type. Automatically generated from version 6.6.0dsc_adobjectenabledstate
: The DSC ADObjectEnabledState resource type. Automatically generated from version 6.6.0dsc_adobjectpermissionentry
: The DSC ADObjectPermissionEntry resource type. Automatically generated from version 6.6.0dsc_adoptionalfeature
: The DSC ADOptionalFeature resource type. Automatically generated from version 6.6.0dsc_adorganizationalunit
: The DSC ADOrganizationalUnit resource type. Automatically generated from version 6.6.0dsc_adreadonlydomaincontrolleraccount
: The DSC ADReadOnlyDomainControllerAccount resource type. Automatically generated from version 6.6.0dsc_adreplicationsite
: The DSC ADReplicationSite resource type. Automatically generated from version 6.6.0dsc_adreplicationsitelink
: The DSC ADReplicationSiteLink resource type. Automatically generated from version 6.6.0dsc_adreplicationsubnet
: The DSC ADReplicationSubnet resource type. Automatically generated from version 6.6.0dsc_adserviceprincipalname
: The DSC ADServicePrincipalName resource type. Automatically generated from version 6.6.0dsc_aduser
: The DSC ADUser resource type. Automatically generated from version 6.6.0dsc_waitforaddomain
: The DSC WaitForADDomain resource type. Automatically generated from version 6.6.0
Resource types
dsc_adcomputer
The DSC ADComputer resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adcomputer
type.
dsc_description
Data type: Optional[String]
Specifies a description of the computer account.
dsc_displayname
Data type: Optional[String]
Specifies the display name of the computer account.
dsc_distinguishedname
Data type: Optional[String]
Returns the X.500 path of the computer object.
dsc_dnshostname
Data type: Optional[String]
Specifies the fully qualified domain name (FQDN) of the computer account.
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Services instance to connect to perform the task.
dsc_enabled
Data type: Optional[Boolean]
Returns $true if the computer object is enabled, otherwise it returns $false.
dsc_enabledoncreation
Data type: Optional[Boolean]
Specifies if the computer account is created enabled or disabled. By default the Enabled property of the computer account will be set to the default value of the cmdlet New-ADComputer. This property is ignored if the parameter RequestFile is specified in the same configuration. This parameter does not enforce the property Enabled. To enforce the property Enabled see the resource ADObjectEnabledState.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the computer account is present or absent. Default value is 'Present'.
dsc_location
Data type: Optional[String]
Specifies the location of the computer, such as an office number.
dsc_manager
Data type: Optional[String]
Specifies the user or group Distinguished Name that manages the computer account. Valid values are the user's or group's DistinguishedName, ObjectGUID, SID or SamAccountName.
dsc_path
Data type: Optional[String]
Specifies the X.500 path of the Organizational Unit (OU) or container where the computer is located.
dsc_requestfile
Data type: Optional[String]
Specifies the full path to the Offline Domain Join Request file to create.
dsc_restorefromrecyclebin
Data type: Optional[Boolean]
Try to restore the computer account from the recycle bin before creating a new one.
dsc_samaccountname
Data type: Optional[String]
Returns the SAM account name of the computer object.
dsc_serviceprincipalnames
Data type: Optional[Array[String]]
Specifies the service principal names for the computer account.
dsc_sid
Data type: Optional[String]
Returns the security identifier of the computer object.
dsc_userprincipalname
Data type: Optional[String]
Specifies the User Principal Name (UPN) assigned to the computer account.
Parameters
The following parameters are available in the dsc_adcomputer
type.
dsc_computername
namevar
Data type: String
Specifies the name of the Active Directory computer account to manage. You can identify a computer by its distinguished name, GUID, security identifier (SID) or Security Accounts Manager (SAM) account name.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform the task.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomain
The DSC ADDomain resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomain
type.
dsc_databasepath
Data type: Optional[String]
Path to a directory that contains the domain database.
dsc_dnsroot
Data type: Optional[String]
Returns the fully qualified domain name (FQDN) DNS root of the domain.
dsc_domainexist
Data type: Optional[Boolean]
Returns $true if the domain is available, or $false if the domain could not be found.
dsc_domainmode
Data type: Optional[Enum['Win2008', 'win2008', 'Win2008R2', 'win2008r2', 'Win2012', 'win2012', 'Win2012R2', 'win2012r2', 'WinThreshold', 'winthreshold']]
The Domain Functional Level for the entire domain.
dsc_domainnetbiosname
Data type: Optional[String]
NetBIOS name for the new domain.
dsc_domaintype
Data type: Optional[Enum['ChildDomain', 'childdomain', 'TreeDomain', 'treedomain']]
When installing a new domain, specifies whether it is a new domain tree in an existing forest ('TreeDomain'), or a child of an existing domain ('ChildDomain'). Only used when installing a new domain. Default value is 'ChildDomain'.
dsc_forest
Data type: Optional[String]
Returns the fully qualified domain name (FQDN) of the forest.
dsc_forestmode
Data type: Optional[Enum['Win2008', 'win2008', 'Win2008R2', 'win2008r2', 'Win2012', 'win2012', 'Win2012R2', 'win2012r2', 'WinThreshold', 'winthreshold']]
The Forest Functional Level for the entire forest.
dsc_logpath
Data type: Optional[String]
Path to a directory for the log file that will be written.
dsc_parentdomainname
Data type: Optional[String]
Fully qualified domain name (FQDN) of the parent domain.
dsc_sysvolpath
Data type: Optional[String]
Path to a directory where the Sysvol file will be written.
Parameters
The following parameters are available in the dsc_addomain
type.
dsc_credential
dsc_dnsdelegationcredential
dsc_domainname
dsc_psdscrunascredential
dsc_safemodeadministratorpassword
dsc_timeout
name
validation_mode
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user name and password that corresponds to the account used to install the domain controller. These are only used when adding a child domain and these credentials need the correct permission in the parent domain. This will not be created as a user in the new domain. The domain administrator password will be the same as the password of the local Administrator of this node.
dsc_dnsdelegationcredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Credential used for creating DNS delegation.
dsc_domainname
namevar
Data type: String
The fully qualified domain name (FQDN) of a new domain. If setting up a child domain this must be set to a single-label DNS name.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_safemodeadministratorpassword
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Password for the administrator account when the computer is started in Safe Mode.
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomaincontroller
The DSC ADDomainController resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomaincontroller
type.
dsc_allowpasswordreplicationaccountname
Data type: Optional[Array[String]]
Specifies an array of names of user accounts, group accounts, and computer accounts whose passwords can be replicated to this Read-Only Domain Controller (RODC).
dsc_databasepath
Data type: Optional[String]
The path where the database will be stored.
dsc_delegatedadministratoraccountname
Data type: Optional[String]
Specifies the user or group that is the delegated administrator of this Read-Only Domain Controller (RODC).
dsc_denypasswordreplicationaccountname
Data type: Optional[Array[String]]
Specifies the names of user accounts, group accounts, and computer accounts whose passwords are not to be replicated to this Read-Only Domain Controller (RODC).
dsc_ensure
Data type: Optional[String]
Returns the state of the Domain Controller.
dsc_flexiblesinglemasteroperationrole
Data type: Optional[Array[Enum['DomainNamingMaster', 'domainnamingmaster', 'SchemaMaster', 'schemamaster', 'InfrastructureMaster', 'infrastructuremaster', 'PDCEmulator', 'pdcemulator', 'RIDMaster', 'ridmaster']]]
Specifies one or more Flexible Single Master Operation (FSMO) roles to move to this domain controller. The current owner must be online and responding for the move to be allowed.
dsc_installationmediapath
Data type: Optional[String]
The path of the media you want to use install the Domain Controller.
dsc_installdns
Data type: Optional[Boolean]
Specifies if the DNS Server service should be installed and configured on the Domain Controller. If this is not set the default value of the parameter InstallDns
of the cmdlet Install-ADDSDomainController is used. This parameter is only used during the provisioning of a domain controller. The parameter cannot be used to install or uninstall the DNS server on an already provisioned domain controller.
dsc_isglobalcatalog
Data type: Optional[Boolean]
Specifies if the domain controller will be a Global Catalog (GC).
dsc_logpath
Data type: Optional[String]
The path where the logs will be stored.
dsc_readonlyreplica
Data type: Optional[Boolean]
Indicates that the resource installs the domain controller as an Read-Only Domain Controller (RODC) for an existing domain.
dsc_sitename
Data type: Optional[String]
The name of the site this Domain Controller will be added to.
dsc_sysvolpath
Data type: Optional[String]
The path where the Sysvol will be stored.
dsc_useexistingaccount
Data type: Optional[Boolean]
Indicates that the resource attaches a server to an existing Read-Only Domain Controller (RODC) account. If specified, a member of the Domain Admins group or a delegated user can apply this resource.
Parameters
The following parameters are available in the dsc_addomaincontroller
type.
dsc_credential
dsc_domainname
dsc_psdscrunascredential
dsc_safemodeadministratorpassword
dsc_timeout
name
validation_mode
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credentials (as a 'PSCredential' object) of a user that has Domain Administrator rights to add the Domain Controller to the domain.
dsc_domainname
namevar
Data type: String
The fully qualified domain name (FQDN) of the domain the Domain Controller will be joining.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_safemodeadministratorpassword
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The 'PSCredential' object containing the password to use for Directory Services Restore Mode (DSRM).
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomaincontrollerproperties
The DSC ADDomainControllerProperties resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomaincontrollerproperties
type.
dsc_contentfreshness
Data type: Optional[Integer[0, 4294967295]]
Specifies the Distributed File System Replication (DFSR) server threshold after the number of days its content is considered stale (MaxOfflineTimeInDays). Once the content is considered stale, the Distributed File System Replication (DFSR) server will no longer be able to replicate.
Parameters
The following parameters are available in the dsc_addomaincontrollerproperties
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]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomaindefaultpasswordpolicy
The DSC ADDomainDefaultPasswordPolicy resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomaindefaultpasswordpolicy
type.
dsc_complexityenabled
Data type: Optional[Boolean]
Whether password complexity is enabled for the default password policy.
dsc_domaincontroller
Data type: Optional[String]
Active Directory domain controller to enact the change upon.
dsc_lockoutduration
Data type: Optional[Integer[0, 4294967295]]
Length of time that an account is locked after the number of failed login attempts (minutes).
dsc_lockoutobservationwindow
Data type: Optional[Integer[0, 4294967295]]
Maximum time between two unsuccessful login attempts before the counter is reset to 0 (minutes).
dsc_lockoutthreshold
Data type: Optional[Integer[0, 4294967295]]
Number of unsuccessful login attempts that are permitted before an account is locked out.
dsc_maxpasswordage
Data type: Optional[Integer[0, 4294967295]]
Maximum length of time that you can have the same password (minutes).
dsc_minpasswordage
Data type: Optional[Integer[0, 4294967295]]
Minimum length of time that you can have the same password (minutes).
dsc_minpasswordlength
Data type: Optional[Integer[0, 4294967295]]
Minimum number of characters that a password must contain.
dsc_passwordhistorycount
Data type: Optional[Integer[0, 4294967295]]
Number of previous passwords to remember.
dsc_reversibleencryptionenabled
Data type: Optional[Boolean]
Whether the directory must store passwords using reversible encryption.
Parameters
The following parameters are available in the dsc_addomaindefaultpasswordpolicy
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Credentials used to access the domain.
dsc_domainname
namevar
Data type: String
Name of the domain to which the password policy will be applied.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomainfunctionallevel
The DSC ADDomainFunctionalLevel resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomainfunctionallevel
type.
dsc_domainmode
Data type: Enum['Windows2008R2Domain', 'windows2008r2domain', 'Windows2012Domain', 'windows2012domain', 'Windows2012R2Domain', 'windows2012r2domain', 'Windows2016Domain', 'windows2016domain']
Specifies the functional level for the Active Directory domain.
Parameters
The following parameters are available in the dsc_addomainfunctionallevel
type.
dsc_domainidentity
namevar
Data type: String
Specifies the Active Directory domain to modify. You can identify a domain by its distinguished name, GUID, security identifier, DNS domain name, or NetBIOS domain name.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_addomaintrust
The DSC ADDomainTrust resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_addomaintrust
type.
dsc_allowtrustrecreation
Data type: Optional[Boolean]
Specifies if the is allowed to be recreated if required. Default value is $false.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the computer account is present or absent. Default value is 'Present'.
dsc_trustdirection
Data type: Enum['Bidirectional', 'bidirectional', 'Inbound', 'inbound', 'Outbound', 'outbound']
Specifies the direction of the trust.
dsc_trusttype
Data type: Enum['External', 'external', 'Forest', 'forest']
Specifies the type of trust. The value 'External' means the context Domain, while the value 'Forest' means the context 'Forest'.
Parameters
The following parameters are available in the dsc_addomaintrust
type.
dsc_psdscrunascredential
dsc_sourcedomainname
dsc_targetcredential
dsc_targetdomainname
dsc_timeout
name
validation_mode
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_sourcedomainname
namevar
Data type: String
Specifies the name of the Active Directory domain that is requesting the trust.
dsc_targetcredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the credentials to authenticate to the target domain.
dsc_targetdomainname
namevar
Data type: String
Specifies the name of the Active Directory domain that is being trusted.
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adfinegrainedpasswordpolicy
The DSC ADFineGrainedPasswordPolicy resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adfinegrainedpasswordpolicy
type.
dsc_complexityenabled
Data type: Optional[Boolean]
Specifies whether password complexity is enabled for the password policy.
dsc_description
Data type: Optional[String]
Specifies the description of the object.
dsc_displayname
Data type: Optional[String]
Specifies the display name of the object.
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Services instance to connect to.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the fine-grained password policy should be present or absent. Default value is 'Present'.
dsc_lockoutduration
Data type: Optional[String]
Specifies the length of time that an account is locked after the number of failed login attempts exceeds the lockout threshold. The lockout duration must be greater than or equal to the lockout observation time for a password policy. The value must be a string representation of a TimeSpan value.
dsc_lockoutobservationwindow
Data type: Optional[String]
Specifies the maximum time interval between two unsuccessful login attempts before the number of unsuccessful login attempts is reset to 0. The lockout observation window must be smaller than or equal to the lockout duration for a password policy. The value must be a string representation of a TimeSpan value.
dsc_lockoutthreshold
Data type: Optional[Integer[0, 4294967295]]
Specifies the number of unsuccessful login attempts that are permitted before an account is locked out.
dsc_maxpasswordage
Data type: Optional[String]
Specifies the maximum length of time that you can have the same password. The value must be a string representation of a TimeSpan value.
dsc_minpasswordage
Data type: Optional[String]
Specifies the minimum length of time before you can change a password. The value must be a string representation of a TimeSpan value.
dsc_minpasswordlength
Data type: Optional[Integer[0, 4294967295]]
Specifies the minimum number of characters that a password must contain.
dsc_passwordhistorycount
Data type: Optional[Integer[0, 4294967295]]
Specifies the number of previous passwords to save.
dsc_precedence
Data type: Integer[0, 4294967295]
Specifies a value that defines the precedence of a fine-grained password policy among all fine-grained password policies.
dsc_protectedfromaccidentaldeletion
Data type: Optional[Boolean]
Specifies whether to prevent the object from being deleted.
dsc_reversibleencryptionenabled
Data type: Optional[Boolean]
Specifies whether the directory must store passwords using reversible encryption.
dsc_subjects
Data type: Optional[Array[String]]
Specifies the ADPrincipal names the policy is to be applied to, overwrites all existing.
Parameters
The following parameters are available in the dsc_adfinegrainedpasswordpolicy
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform this task.
dsc_name
namevar
Data type: String
Specifies an Active Directory fine-grained password policy object name.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adforestfunctionallevel
The DSC ADForestFunctionalLevel resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adforestfunctionallevel
type.
dsc_forestmode
Data type: Enum['Windows2008R2Forest', 'windows2008r2forest', 'Windows2012Forest', 'windows2012forest', 'Windows2012R2Forest', 'windows2012r2forest', 'Windows2016Forest', 'windows2016forest']
Specifies the the functional level for the Active Directory forest.
Parameters
The following parameters are available in the dsc_adforestfunctionallevel
type.
dsc_forestidentity
namevar
Data type: String
Specifies the Active Directory forest to modify. You can identify a forest by its fully qualified domain name (FQDN), GUID, DNS host name, or NetBIOS name.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adforestproperties
The DSC ADForestProperties resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adforestproperties
type.
dsc_serviceprincipalnamesuffix
Data type: Optional[Array[String]]
Specifies the Service Principal Name (SPN) Suffix(es) to be explicitly defined in the forest and replace existing Service Principal Names. Cannot be used with ServicePrincipalNameSuffixToAdd or ServicePrincipalNameSuffixToRemove.
dsc_serviceprincipalnamesuffixtoadd
Data type: Optional[Array[String]]
Specifies the Service Principal Name (SPN) Suffix(es) to be added to the forest. Cannot be used with ServicePrincipalNameSuffix.
dsc_serviceprincipalnamesuffixtoremove
Data type: Optional[Array[String]]
Specifies the Service Principal Name (SPN) Suffix(es) to be removed from the forest. Cannot be used with ServicePrincipalNameSuffix.
dsc_tombstonelifetime
Data type: Optional[Integer[-2147483648, 2147483647]]
Specifies the AD Tombstone lifetime which determines how long deleted items exist in Active Directory before they are purged.
dsc_userprincipalnamesuffix
Data type: Optional[Array[String]]
Specifies the User Principal Name (UPN) Suffix(es) to be explicitly defined in the forest and replace existing User Principal Names. Cannot be used with UserPrincipalNameSuffixToAdd or UserPrincipalNameSuffixToRemove.
dsc_userprincipalnamesuffixtoadd
Data type: Optional[Array[String]]
Specifies the User Principal Name (UPN) Suffix(es) to be added to the forest. Cannot be used with UserPrincipalNameSuffix.
dsc_userprincipalnamesuffixtoremove
Data type: Optional[Array[String]]
Specifies the User Principal Name (UPN) Suffix(es) to be removed from the forest. Cannot be used with UserPrincipalNameSuffix.
Parameters
The following parameters are available in the dsc_adforestproperties
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform this task.
dsc_forestname
namevar
Data type: String
Specifies the target Active Directory forest for the change.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adgroup
The DSC ADGroup resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adgroup
type.
dsc_category
Data type: Optional[Enum['Security', 'security', 'Distribution', 'distribution']]
Active Directory group category. Default value is 'Security'.
dsc_description
Data type: Optional[String]
Description of the Active Directory group.
dsc_displayname
Data type: Optional[String]
Display name of the Active Directory group.
dsc_distinguishedname
Data type: Optional[String]
Returns the distinguished name of the Active Directory group.
dsc_domaincontroller
Data type: Optional[String]
Active Directory domain controller to enact the change upon.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if this Active Directory group should be present or absent. Default value is 'Present'.
dsc_groupscope
Data type: Optional[Enum['DomainLocal', 'domainlocal', 'Global', 'global', 'Universal', 'universal']]
Active Directory group scope. Default value is 'Global'.
dsc_managedby
Data type: Optional[String]
Active Directory managed by attribute specified as a DistinguishedName.
dsc_members
Data type: Optional[Array[String]]
Active Directory group membership should match membership exactly.
dsc_membershipattribute
Data type: Optional[Enum['SamAccountName', 'samaccountname', 'DistinguishedName', 'distinguishedname', 'ObjectGUID', 'objectguid', 'SID', 'sid']]
Active Directory attribute used to perform membership operations. Default value is 'SamAccountName'.
dsc_memberstoexclude
Data type: Optional[Array[String]]
Active Directory group should NOT include these members.
dsc_memberstoinclude
Data type: Optional[Array[String]]
Active Directory group should include these members.
dsc_notes
Data type: Optional[String]
Active Directory group notes field.
dsc_path
Data type: Optional[String]
Location of the group within Active Directory expressed as a Distinguished Name.
dsc_restorefromrecyclebin
Data type: Optional[Boolean]
Try to restore the group from the recycle bin before creating a new one.
Parameters
The following parameters are available in the dsc_adgroup
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential to be used to perform the operation on Active Directory.
dsc_groupname
namevar
Data type: String
Name of the Active Directory group.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adkdskey
The DSC ADKDSKey resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adkdskey
type.
dsc_allowunsafeeffectivetime
Data type: Optional[Boolean]
This option will allow you to create a KDS root key if EffectiveTime is set in the past. This may cause issues if you are creating a Group Managed Service Account right after you create the KDS Root Key. In order to get around this, you must create the KDS Root Key using a date in the past. This should be used at your own risk and should only be used in lab environments.
dsc_creationtime
Data type: Optional[Timestamp]
Returns the Creation date and time of the KDS root key for informational purposes.
dsc_distinguishedname
Data type: Optional[String]
Returns the Distinguished Name (DN) of the KDS root key. The KDS Root Key is stored in 'CN=Master Root Keys,CN=Group Key Distribution Service,CN=Services,CN=Configuration' at the Forest level. This is also why replication needs 10 hours to occur before using the KDS Root Key as a safety measure.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if this KDS Root Key should be present or absent. Default value is 'Present'.
dsc_forceremove
Data type: Optional[Boolean]
This option will allow you to remove a KDS root key if there is only one key left. It should not break your Group Managed Service Accounts (gMSA), but if the gMSA password expires and it needs to request a new password, it will not be able to generate a new password until a new KDS Root Key is installed and ready for use. Because of this, the last KDS Root Key will not be removed unless this option is specified.
dsc_keyid
Data type: Optional[String]
Returns the KeyID of the KDS root key. This is the Common Name (CN) within Active Directory and is required to build the Distinguished Name.
Parameters
The following parameters are available in the dsc_adkdskey
type.
dsc_effectivetime
namevar
Data type: String
Specifies the Effective time when a KDS root key can be used. There is a 10 hour minimum from creation date to allow active directory to properly replicate across all domain controllers. For this reason, the date must be set in the future for creation. While this parameter accepts a string, it will be converted into a DateTime object. This will also try to take into account cultural settings. Example: '05/01/1999 13:00 using default or 'en-US' culture would be May 1st, but using 'de-DE' culture would be 5th of January. The culture is automatically pulled from the operating system and this can be checked using 'Get-Culture'.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_admanagedserviceaccount
The DSC ADManagedServiceAccount resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_admanagedserviceaccount
type.
dsc_accounttype
Data type: Enum['Group', 'group', 'Standalone', 'standalone']
The type of managed service account. Standalone will create a Standalone Managed Service Account (sMSA) and Group will create a Group Managed Service Account (gMSA).
dsc_commonname
Data type: Optional[String]
Specifies the common name assigned to the managed service account (ldapDisplayName 'cn'). If not specified the default value will be the same value provided in parameter ServiceAccountName.
dsc_description
Data type: Optional[String]
Specifies the description of the account (ldapDisplayName 'description').
dsc_displayname
Data type: Optional[String]
Specifies the display name of the account (ldapDisplayName 'displayName').
dsc_distinguishedname
Data type: Optional[String]
Returns the Distinguished Name of the Service Account.
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Controller instance to use to perform the task. This is only required if not executing the task on a domain controller.
dsc_enabled
Data type: Optional[Boolean]
Returns whether the user account is enabled or disabled.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the user account is created or deleted. If not specified, this value defaults to Present.
dsc_kerberosencryptiontype
Data type: Optional[Array[Enum['None', 'none', 'RC4', 'rc4', 'AES128', 'aes128', 'AES256', 'aes256']]]
Specifies which Kerberos encryption types the account supports when creating service tickets. This value sets the encryption types supported flags of the Active Directory msDS-SupportedEncryptionTypes attribute.
dsc_managedpasswordprincipals
Data type: Optional[Array[String]]
Specifies the membership policy for systems which can use a group managed service account. (ldapDisplayName 'msDS-GroupMSAMembership'). Only used when 'Group' is selected for 'AccountType'.
dsc_membershipattribute
Data type: Optional[Enum['SamAccountName', 'samaccountname', 'DistinguishedName', 'distinguishedname', 'ObjectGUID', 'objectguid', 'ObjectSid', 'objectsid']]
Active Directory attribute used to perform membership operations for Group Managed Service Accounts (gMSA). If not specified, this value defaults to SamAccountName.
dsc_path
Data type: Optional[String]
Specifies the X.500 path of the Organizational Unit (OU) or container where the new account is created. Specified as a Distinguished Name (DN).
dsc_trustedfordelegation
Data type: Optional[Boolean]
Specifies whether an account is trusted for Kerberos delegation. Default value is $false.
Parameters
The following parameters are available in the dsc_admanagedserviceaccount
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform this task. This is only required if not executing the task on a domain controller or using the parameter DomainController.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_serviceaccountname
namevar
Data type: String
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName 'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 15 characters or less. Once created, the user's SamAccountName cannot be changed.
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adobjectenabledstate
The DSC ADObjectEnabledState resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adobjectenabledstate
type.
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Services instance to connect to perform the task.
dsc_enabled
Data type: Boolean
Specifies the value of the Enabled property.
Parameters
The following parameters are available in the dsc_adobjectenabledstate
type.
dsc_credential
dsc_identity
dsc_objectclass
dsc_psdscrunascredential
dsc_timeout
name
validation_mode
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform the task.
dsc_identity
namevar
Data type: String
Specifies the identity of an object that has the object class specified in the parameter ObjectClass. When ObjectClass is set to 'Computer' then this property can be set to either distinguished name, GUID (objectGUID), security identifier (objectSid), or security Accounts Manager account name (sAMAccountName).
dsc_objectclass
namevar
Data type: Enum['Computer', 'computer']
Specifies the object class.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adobjectpermissionentry
The DSC ADObjectPermissionEntry resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adobjectpermissionentry
type.
dsc_activedirectoryrights
Data type: Optional[Array[Enum['AccessSystemSecurity', 'accesssystemsecurity', 'CreateChild', 'createchild', 'Delete', 'delete', 'DeleteChild', 'deletechild', 'DeleteTree', 'deletetree', 'ExtendedRight', 'extendedright', 'GenericAll', 'genericall', 'GenericExecute', 'genericexecute', 'GenericRead', 'genericread', 'GenericWrite', 'genericwrite', 'ListChildren', 'listchildren', 'ListObject', 'listobject', 'ReadControl', 'readcontrol', 'ReadProperty', 'readproperty', 'Self', 'self', 'Synchronize', 'synchronize', 'WriteDacl', 'writedacl', 'WriteOwner', 'writeowner', 'WriteProperty', 'writeproperty']]]
A combination of one or more of the ActiveDirectoryRights enumeration values that specifies the rights of the access rule. Default value is 'GenericAll'.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Indicates if the access will be added (Present) or will be removed (Absent). Default value is 'Present'.
Parameters
The following parameters are available in the dsc_adobjectpermissionentry
type.
dsc_accesscontroltype
dsc_activedirectorysecurityinheritance
dsc_identityreference
dsc_inheritedobjecttype
dsc_objecttype
dsc_path
dsc_psdscrunascredential
dsc_timeout
name
validation_mode
dsc_accesscontroltype
namevar
Data type: Enum['Allow', 'allow', 'Deny', 'deny']
Indicates whether to Allow or Deny access to the target object.
dsc_activedirectorysecurityinheritance
namevar
Data type: Enum['All', 'all', 'Children', 'children', 'Descendents', 'descendents', 'None', 'none', 'SelfAndChildren', 'selfandchildren']
One of the 'ActiveDirectorySecurityInheritance' enumeration values that specifies the inheritance type of the access rule.
dsc_identityreference
namevar
Data type: String
Indicates the identity of the principal for the ACE. Use the notation DOMAIN\SamAccountName for the identity.
dsc_inheritedobjecttype
namevar
Data type: String
The schema GUID of the child object type that can inherit this access rule. If the permission entry shouldn't be restricted to a specific inherited object type, use the zero guid (00000000-0000-0000-0000-000000000000).
dsc_objecttype
namevar
Data type: String
The schema GUID of the object to which the access rule applies. If the permission entry shouldn't be restricted to a specific object type, use the zero guid (00000000-0000-0000-0000-000000000000).
dsc_path
namevar
Data type: String
Active Directory path of the target object to add or remove the permission entry, specified as a Distinguished Name.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adoptionalfeature
The DSC ADOptionalFeature resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adoptionalfeature
type.
dsc_enabled
Data type: Optional[Boolean]
Shows the current state of the feature i.e. enabled or not
Parameters
The following parameters are available in the dsc_adoptionalfeature
type.
dsc_enterpriseadministratorcredential
dsc_featurename
dsc_forestfqdn
dsc_psdscrunascredential
dsc_timeout
name
validation_mode
dsc_enterpriseadministratorcredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform this task.
dsc_featurename
namevar
Data type: String
Specifies the feature to be activated
dsc_forestfqdn
namevar
Data type: String
Specifies the target Active Directory forest for the change.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adorganizationalunit
The DSC ADOrganizationalUnit resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adorganizationalunit
type.
dsc_description
Data type: Optional[String]
Specifies the description of the Organizational Unit (OU). Default value is empty ('').
dsc_distinguishedname
Data type: Optional[String]
Returns the X.500 distinguished name of the Organizational Unit.
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Services instance to use to perform the task.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the Organizational Unit (OU) should be present or absent. Default value is 'Present'.
dsc_protectedfromaccidentaldeletion
Data type: Optional[Boolean]
Specifies if the Organizational Unit (OU) container should be protected from deletion. Default value is $true.
dsc_restorefromrecyclebin
Data type: Optional[Boolean]
Try to restore the Organizational Unit (OU) from the recycle bin before creating a new one.
Parameters
The following parameters are available in the dsc_adorganizationalunit
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credential to be used to perform the operation on Active Directory.
dsc_name
namevar
Data type: String
The name of the Organizational Unit (OU).
dsc_path
namevar
Data type: String
Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adreadonlydomaincontrolleraccount
The DSC ADReadOnlyDomainControllerAccount resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adreadonlydomaincontrolleraccount
type.
dsc_allowpasswordreplicationaccountname
Data type: Optional[Array[String]]
Specifies an array of names of user accounts, group accounts, and computer accounts whose passwords can be replicated to this Read-Only Domain Controller (RODC) Account.
dsc_delegatedadministratoraccountname
Data type: Optional[String]
Specifies the user or group that is the delegated administrator of this Read-Only Domain Controller (RODC) Account.
dsc_denypasswordreplicationaccountname
Data type: Optional[Array[String]]
Specifies the names of user accounts, group accounts, and computer accounts whose passwords are not to be replicated to this Read-Only Domain Controller (RODC) Account.
dsc_ensure
Data type: Optional[String]
Returns the state of the Read Only Domain Controller Account.
dsc_installdns
Data type: Optional[Boolean]
Specifies if the DNS Server service should be installed and configured on the Read Only Domain Controller. If this is not set the default value of the parameter InstallDns
of the cmdlet Add-ADDSReadOnlyDomainControllerAccount is used. This parameter is only used during the provisioning of a read only domain controller. The parameter cannot be used to install or uninstall the DNS server on an already provisioned read only domain controller.
dsc_isglobalcatalog
Data type: Optional[Boolean]
Specifies if the read only domain controller will be a Global Catalog (GC).
dsc_sitename
Data type: String
The name of the site this Read Only Domain Controller Account will be added to.
Parameters
The following parameters are available in the dsc_adreadonlydomaincontrolleraccount
type.
dsc_credential
dsc_domaincontrolleraccountname
dsc_domainname
dsc_psdscrunascredential
dsc_timeout
name
validation_mode
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
The credentials (as a 'PSCredential' object) of a user that has Domain Administrator rights to add the Read Only Domain Controller Account to the domain.
dsc_domaincontrolleraccountname
namevar
Data type: String
The name of the Read Only Domain Controller Account which will be created.
dsc_domainname
namevar
Data type: String
The fully qualified domain name (FQDN) of the domain the Read Only Domain Controller will be created in.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adreplicationsite
The DSC ADReplicationSite resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adreplicationsite
type.
dsc_description
Data type: Optional[String]
Specifies a description of the object. This parameter sets the value of the Description property for the object. The LDAP Display Name (ldapDisplayName) for this property is 'description'.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if the Active Directory replication site should be present or absent. Default value is 'Present'.
dsc_renamedefaultfirstsitename
Data type: Optional[Boolean]
Specifies if the Default-First-Site-Name should be renamed if it exists. Default value is $false.
Parameters
The following parameters are available in the dsc_adreplicationsite
type.
dsc_name
namevar
Data type: String
Specifies the name of the Active Directory replication site.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adreplicationsitelink
The DSC ADReplicationSiteLink resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adreplicationsitelink
type.
dsc_cost
Data type: Optional[Integer[-2147483648, 2147483647]]
Specifies the cost to be placed on the site link.
dsc_description
Data type: Optional[String]
This parameter sets the value of the Description property for the object.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if the site link should be present or absent. Default value is 'Present'.
dsc_optionchangenotification
Data type: Optional[Boolean]
Enables or disables Change Notification Replication on a site link. Default value is $false.
dsc_optiondisablecompression
Data type: Optional[Boolean]
Enables or disables Compression on a site link. Default value is $false.
dsc_optiontwowaysync
Data type: Optional[Boolean]
Enables or disables Two Way Sync on a site link. Default value is $false.
dsc_replicationfrequencyinminutes
Data type: Optional[Integer[-2147483648, 2147483647]]
Species the frequency (in minutes) for which replication will occur where this site link is in use between sites.
dsc_sitesexcluded
Data type: Optional[Array[String]]
Specifies the list of sites to exclude from the site link.
dsc_sitesincluded
Data type: Optional[Array[String]]
Specifies the list of sites included in the site link.
Parameters
The following parameters are available in the dsc_adreplicationsitelink
type.
dsc_name
namevar
Data type: String
Specifies the name of the site link.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adreplicationsubnet
The DSC ADReplicationSubnet resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adreplicationsubnet
type.
dsc_description
Data type: Optional[String]
Specifies a description of the object. This parameter sets the value of the Description property for the object.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if the Active Directory replication subnet should be present or absent. Default value is 'Present'.
dsc_location
Data type: Optional[String]
The location for the Active Directory replication site. Default value is empty ('') location.
dsc_site
Data type: String
The name of the assigned Active Directory replication site, e.g. Default-First-Site-Name.
Parameters
The following parameters are available in the dsc_adreplicationsubnet
type.
dsc_name
namevar
Data type: String
The name of the Active Directory replication subnet, e.g. 10.0.0.0/24.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_adserviceprincipalname
The DSC ADServicePrincipalName resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_adserviceprincipalname
type.
dsc_account
Data type: Optional[String]
The user or computer account to add or remove the SPN to, e.g. User1 or LON-DC1$. Default value is ''. If Ensure is set to Present, a value must be specified.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies if the service principal name should be added or removed. Default value is 'Present'.
Parameters
The following parameters are available in the dsc_adserviceprincipalname
type.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_serviceprincipalname
namevar
Data type: String
The full SPN to add or remove, e.g. HOST/LON-DC1.
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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_aduser
The DSC ADUser resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_aduser
type.
dsc_accountnotdelegated
Data type: Optional[Boolean]
Indicates whether the security context of the user is delegated to a service. When this parameter is set to true, the security context of the account is not delegated to a service even when the service account is set as trusted for Kerberos delegation. This parameter sets the AccountNotDelegated property for an Active Directory account. This parameter also sets the ADS_UF_NOT_DELEGATED flag of the Active Directory User Account Control (UAC) attribute.
dsc_allowreversiblepasswordencryption
Data type: Optional[Boolean]
Indicates whether reversible password encryption is allowed for the account. This parameter sets the AllowReversiblePasswordEncryption property of the account. This parameter also sets the ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED flag of the Active Directory User Account Control (UAC) attribute.
dsc_cannotchangepassword
Data type: Optional[Boolean]
Specifies whether the account password can be changed.
dsc_changepasswordatlogon
Data type: Optional[Boolean]
Specifies whether the account password must be changed during the next logon attempt. This will only be enabled when the user is initially created. This parameter cannot be set to $true if the parameter PasswordNeverExpires is also set to $true.
dsc_city
Data type: Optional[String]
Specifies the user's town or city (ldapDisplayName 'l').
dsc_commonname
Data type: Optional[String]
Specifies the common name assigned to the user account (ldapDisplayName 'cn'). If not specified the default value will be the same value provided in parameter UserName.
dsc_company
Data type: Optional[String]
Specifies the user's company (ldapDisplayName 'company').
dsc_compoundidentitysupported
Data type: Optional[Boolean]
Specifies whether an account supports Kerberos service tickets which includes the authorization data for the user's device. This value sets the compound identity supported flag of the Active Directory msDS-SupportedEncryptionTypes attribute.
dsc_country
Data type: Optional[String]
Specifies the country or region code for the user's language of choice (ldapDisplayName 'c').
dsc_department
Data type: Optional[String]
Specifies the user's department (ldapDisplayName 'department').
dsc_description
Data type: Optional[String]
Specifies a description of the object (ldapDisplayName 'description').
dsc_displayname
Data type: Optional[String]
Specifies the display name of the object (ldapDisplayName 'displayName').
dsc_distinguishedname
Data type: Optional[String]
Returns the X.500 path of the object.
dsc_division
Data type: Optional[String]
Specifies the user's division (ldapDisplayName 'division').
dsc_domaincontroller
Data type: Optional[String]
Specifies the Active Directory Domain Services instance to use to perform the task.
dsc_emailaddress
Data type: Optional[String]
Specifies the user's e-mail address (ldapDisplayName 'mail').
dsc_employeeid
Data type: Optional[String]
Specifies the user's employee ID (ldapDisplayName 'employeeID').
dsc_employeenumber
Data type: Optional[String]
Specifies the user's employee number (ldapDisplayName 'employeeNumber').
dsc_enabled
Data type: Optional[Boolean]
Specifies if the account is enabled. Default value is $true.
dsc_ensure
Data type: Optional[Enum['Present', 'present', 'Absent', 'absent']]
Specifies whether the user account should be present or absent. Default value is 'Present'.
dsc_fax
Data type: Optional[String]
Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber').
dsc_givenname
Data type: Optional[String]
Specifies the user's given name (ldapDisplayName 'givenName').
dsc_homedirectory
Data type: Optional[String]
Specifies a user's home directory path (ldapDisplayName 'homeDirectory').
dsc_homedrive
Data type: Optional[String]
Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive').
dsc_homepage
Data type: Optional[String]
Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage').
dsc_homephone
Data type: Optional[String]
Specifies the user's home telephone number (ldapDisplayName 'homePhone').
dsc_initials
Data type: Optional[String]
Specifies the initials that represent part of a user's name (ldapDisplayName 'initials').
dsc_ipphone
Data type: Optional[String]
Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone').
dsc_jobtitle
Data type: Optional[String]
Specifies the user's title (ldapDisplayName 'title').
dsc_logonscript
Data type: Optional[String]
Specifies a path to the user's log on script (ldapDisplayName 'scriptPath').
dsc_logonworkstations
Data type: Optional[String]
Specifies the computers that the user can access. To specify more than one computer, create a single comma-separated list. You can identify a computer by using the Security Account Manager (SAM) account name (sAMAccountName) or the DNS host name of the computer. The SAM account name is the same as the NetBIOS name of the computer. The LDAP display name (ldapDisplayName) for this property is userWorkStations.
dsc_manager
Data type: Optional[String]
Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager').
dsc_mobilephone
Data type: Optional[String]
Specifies the user's mobile phone number (ldapDisplayName 'mobile').
dsc_notes
Data type: Optional[String]
Specifies the notes attached to the user's accoutn (ldapDisplayName 'info').
dsc_office
Data type: Optional[String]
Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName').
dsc_officephone
Data type: Optional[String]
Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber').
dsc_organization
Data type: Optional[String]
Specifies the user's organization. This parameter sets the Organization property of a user object. The LDAP display name (ldapDisplayName) of this property is 'o'.
dsc_othername
Data type: Optional[String]
Specifies a name in addition to a user's given name and surname, such as the user's middle name. This parameter sets the OtherName property of a user object. The LDAP display name (ldapDisplayName) of this property is 'middleName'.
dsc_pager
Data type: Optional[String]
Specifies the user's pager number (ldapDisplayName 'pager').
dsc_passwordauthentication
Data type: Optional[Enum['Default', 'default', 'Negotiate', 'negotiate']]
Specifies the authentication context type used when testing passwords. Default value is 'Default'.
dsc_passwordneverexpires
Data type: Optional[Boolean]
Specifies whether the password of an account can expire.
dsc_passwordneverresets
Data type: Optional[Boolean]
Specifies whether existing user's password should be reset. Default value is $false.
dsc_passwordnotrequired
Data type: Optional[Boolean]
Specifies whether the account requires a password. A password is not required for a new account. This parameter sets the PasswordNotRequired property of an account object.
dsc_path
Data type: Optional[String]
Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.
dsc_pobox
Data type: Optional[String]
Specifies the user's post office box number (ldapDisplayName 'postOfficeBox').
dsc_postalcode
Data type: Optional[String]
Specifies the user's postal code or zip code (ldapDisplayName 'postalCode').
dsc_profilepath
Data type: Optional[String]
Specifies a path to the user's profile (ldapDisplayName 'profilePath').
dsc_proxyaddresses
Data type: Optional[Array[String]]
Specifies the proxy addresses for the user account.
dsc_restorefromrecyclebin
Data type: Optional[Boolean]
Try to restore the user object from the recycle bin before creating a new one.
dsc_serviceprincipalnames
Data type: Optional[Array[String]]
Specifies the service principal names for the user account.
dsc_smartcardlogonrequired
Data type: Optional[Boolean]
Specifies whether a smart card is required to logon. This parameter sets the SmartCardLoginRequired property for a user object. This parameter also sets the ADS_UF_SMARTCARD_REQUIRED flag of the Active Directory User Account Control attribute.
dsc_state
Data type: Optional[String]
Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st').
dsc_streetaddress
Data type: Optional[String]
Specifies the user's street address (ldapDisplayName 'streetAddress').
dsc_surname
Data type: Optional[String]
Specifies the user's last name or surname (ldapDisplayName 'sn').
dsc_thumbnailphoto
Data type: Optional[String]
Specifies the thumbnail photo to be used for the user object. Can be set either to a path pointing to a .jpg-file, or to a Base64-encoded jpeg image. If set to an empty string ('') the current thumbnail photo will be removed. The property ThumbnailPhoto will always return the image as a Base64-encoded string even if the configuration specified a file path.
dsc_thumbnailphotohash
Data type: Optional[String]
Return the MD5 hash of the current thumbnail photo, or $null if no thumbnail photo exist.
dsc_trustedfordelegation
Data type: Optional[Boolean]
Specifies whether an account is trusted for Kerberos delegation. Default value is $false.
dsc_userprincipalname
Data type: Optional[String]
Specifies the User Principal Name (UPN) assigned to the user account (ldapDisplayName 'userPrincipalName').
Parameters
The following parameters are available in the dsc_aduser
type.
dsc_credential
dsc_domainname
dsc_password
dsc_psdscrunascredential
dsc_timeout
dsc_username
name
validation_mode
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the user account credentials to use to perform this task.
dsc_domainname
namevar
Data type: String
Name of the domain where the user account is located (only used if password is managed).
dsc_password
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies a new password value for the account.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
dsc_username
namevar
Data type: String
Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName').
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_waitforaddomain
The DSC WaitForADDomain resource type. Automatically generated from version 6.6.0
Properties
The following properties are available in the dsc_waitforaddomain
type.
dsc_isavailable
Data type: Optional[Boolean]
Returns a value indicating if a domain controller was found.
dsc_restartcount
Data type: Optional[Integer[0, 4294967295]]
Specifies the number of times the node will be reboot in an effort to connect to the domain.
dsc_sitename
Data type: Optional[String]
Specifies the site in the domain where to look for a domain controller.
dsc_waitforvalidcredentials
Data type: Optional[Boolean]
Specifies that the resource will not throw an error if authentication fails using the provided credentials and continue wait for the timeout. This can be used if the credentials are known to eventually exist but there are a potential timing issue before they are accessible.
dsc_waittimeout
Data type: Optional[Integer[0, 18446744073709551615]]
Specifies the timeout in seconds that the resource will wait for the domain to be accessible. Default value is 300 seconds.
Parameters
The following parameters are available in the dsc_waitforaddomain
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
Specifies the credentials that are used when accessing the domain, unless the built-in PsDscRunAsCredential is used.
dsc_domainname
namevar
Data type: String
Specifies the fully qualified domain name to wait for.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
dsc_timeout
Data type: Optional[Integer]
The maximum time in seconds to wait for the DSC resource to complete.
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
[6.6.0] - 2024-09-29
Added
- ADManagedServiceAccount
- New parameter TrustedForDelegation for Kerberos Delegation (issue #717).
- ADDomainController
- New parameter UseExistingAccount for attaching a server to an existing RODC account. (issue #711).
- ADReadOnlyDomainControllerAccount
- New resource for pre-creating Read Only Domain Controller accounts. (issue #40) (issue #711).
Fixed
- ActiveDirectoryDsc.Common
- Fixed Get-DomainControllerObject to allow checking non-local domain controller accounts.
- ADObjectPermissionEntry
- Fixed 'The object name has a bad syntax' error when using path that requires escaping. (issue #675).
- Update build process to pin GitVersion to 5.* to resolve errors (https://github.com/gaelcolas/Sampler/issues/477).
Dependencies
- puppetlabs/pwshlib (>= 1.2.0 < 2.0.0)