-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADComputer: Add example to create cluster computer account (#461)
- Changes to ActiveDirectoryDsc - Fix examples that had duplicate guid that would have prevented them to be published. - Changes to ADComputer - Add example showing how to create cluster computer account (issue #401).
- Loading branch information
Showing
12 changed files
with
134 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
Examples/Resources/ADComputer/5-ADComputer_CreateClusterComputerAccount_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0.0 | ||
.GUID 331c7f40-112d-468c-9bd0-8f1b073bee44 | ||
.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 | ||
#Requires -module xFailoverCluster | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will create a computer account disabled, configure | ||
a cluster using the disabled computer account, and enforcing the | ||
computer account to be enabled. | ||
#> | ||
Configuration ADComputer_CreateClusterComputerAccount_Config | ||
{ | ||
param | ||
( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$Credential | ||
) | ||
|
||
Import-DscResource -ModuleName ActiveDirectoryDsc | ||
Import-DscResource -ModuleName xFailoverCluster | ||
|
||
node localhost | ||
{ | ||
ADComputer 'ClusterAccount' | ||
{ | ||
ComputerName = 'CLU_CNO01' | ||
EnabledOnCreation = $false | ||
} | ||
|
||
xCluster 'CreateCluster' | ||
{ | ||
Name = 'CLU_CNO01' | ||
StaticIPAddress = '192.168.100.20/24' | ||
DomainAdministratorCredential = $Credential | ||
|
||
DependsOn = '[ADComputer]ClusterAccount' | ||
} | ||
|
||
ADObjectEnabledState 'EnforceEnabledPropertyToEnabled' | ||
{ | ||
Identity = 'CLU_CNO01' | ||
ObjectClass = 'Computer' | ||
Enabled = $true | ||
|
||
DependsOn = '[xCluster]CreateCluster' | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/Resources/ADObjectEnabledState/1-ADObjectEnabledState_EnabledComputerAccount_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...jectEnabledState/3-ADObjectEnabledState_EnabledPrestagedClusterComputerAccount_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Examples/Resources/ADUser/2-ADUser_CreateUserAndIgnorePasswordChanges_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aitForADDomain/2-WaitForADDomain_WaitForDomainControllerUsingBuiltInCredential_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...urces/WaitForADDomain/3-WaitForADDomain_WaitForDomainControllerUsingCredential_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ples/Resources/WaitForADDomain/4-WaitForADDomain_WaitForDomainControllerInSite_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Resources/WaitForADDomain/5-WaitForADDomain_WaitForDomainControllerWithReboot_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...urces/WaitForADDomain/6-WaitForADDomain_WaitForDomainControllerWithLongerDelay_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters