Examples/Resources/ADObjectEnabledState/1-ADObjectEnabledState_EnabledComputerAccount_Config.ps1
<#PSScriptInfo
.VERSION 1.0.0 .GUID d2dfbf17-b113-42f7-9abe-f6c6dc5ea086 .AUTHOR Microsoft Corporation .COMPANYNAME Microsoft Corporation .COPYRIGHT (c) Microsoft Corporation. All rights reserved. .TAGS DSCConfiguration .LICENSEURI https://github.com/PowerShell/ActiveDirectoryDsc/blob/master/LICENSE .PROJECTURI https://github.com/PowerShell/ActiveDirectoryDsc .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES First version. .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core #> #Requires -module ActiveDirectoryDsc <# .DESCRIPTION This configuration will create a computer account disabled, and enforcing the account to be enabled. #> Configuration ADObjectEnabledState_EnabledComputerAccount_Config { Import-DscResource -ModuleName ActiveDirectoryDsc node localhost { ADComputer 'CreateDisabled' { ComputerName = 'CLU_CNO01' EnabledOnCreation = $false } ADObjectEnabledState 'EnforceEnabledPropertyToEnabled' { Identity = 'CLU_CNO01' ObjectClass = 'Computer' Enabled = $true DependsOn = '[ADComputer]CreateDisabled' } } } |