-
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.
xActiveDirectory: Add Missing Resource Examples (#397)
- Changes to xActiveDirectory - Added missing examples for xADReplicationSubnet, xADServicePrincipalName and xWaitForADDomain (issue #395).
- Loading branch information
1 parent
7fb5aa7
commit 46634ed
Showing
6 changed files
with
157 additions
and
1 deletion.
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
38 changes: 38 additions & 0 deletions
38
Examples/Resources/xADReplicationSubnet/1-CreateReplicationSubnet_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,38 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0 | ||
.GUID 3d2af0ab-3470-4da7-a38b-1c05ef384e05 | ||
.AUTHOR Microsoft Corporation | ||
.COMPANYNAME Microsoft Corporation | ||
.COPYRIGHT (c) Microsoft Corporation. All rights reserved. | ||
.TAGS DSCConfiguration | ||
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE | ||
.PROJECTURI https://github.com/PowerShell/xActiveDirectory | ||
.ICONURI | ||
.EXTERNALMODULEDEPENDENCIES | ||
.REQUIREDSCRIPTS | ||
.EXTERNALSCRIPTDEPENDENCIES | ||
.RELEASENOTES | ||
.PRIVATEDATA | ||
#> | ||
|
||
#Requires -module xActiveDirectory | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will create an AD Replication Subnet. | ||
#> | ||
|
||
Configuration CreateReplicationSubnet_Config | ||
{ | ||
Import-DscResource -Module xActiveDirectory | ||
|
||
Node localhost | ||
{ | ||
xADReplicationSubnet 'LondonSubnet' | ||
{ | ||
Name = '10.0.0.0/24' | ||
Site = 'London' | ||
Location = 'Datacenter 3' | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
Examples/Resources/xADServicePrincipalName/1-AddUserServicePrincipalName_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,37 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0 | ||
.GUID 0c29d71c-5787-49e6-97e9-c74583028f63 | ||
.AUTHOR Microsoft Corporation | ||
.COMPANYNAME Microsoft Corporation | ||
.COPYRIGHT (c) Microsoft Corporation. All rights reserved. | ||
.TAGS DSCConfiguration | ||
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE | ||
.PROJECTURI https://github.com/PowerShell/xActiveDirectory | ||
.ICONURI | ||
.EXTERNALMODULEDEPENDENCIES | ||
.REQUIREDSCRIPTS | ||
.EXTERNALSCRIPTDEPENDENCIES | ||
.RELEASENOTES | ||
.PRIVATEDATA | ||
#> | ||
|
||
#Requires -module xActiveDirectory | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will add a Service Principal Name to a user account. | ||
#> | ||
|
||
Configuration AddUserServicePrincipalName_Config | ||
{ | ||
Import-DscResource -Module xActiveDirectory | ||
|
||
Node localhost | ||
{ | ||
xADServicePrincipalName 'SQL01Svc' | ||
{ | ||
ServicePrincipalName = 'MSSQLSvc/sql01.contoso.com:1433' | ||
Account = 'SQL01Svc' | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
Examples/Resources/xADServicePrincipalName/2-AddComputerServicePrincipalName_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,37 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0 | ||
.GUID 634194bb-189a-4b26-bd80-7c01270026ea | ||
.AUTHOR Microsoft Corporation | ||
.COMPANYNAME Microsoft Corporation | ||
.COPYRIGHT (c) Microsoft Corporation. All rights reserved. | ||
.TAGS DSCConfiguration | ||
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE | ||
.PROJECTURI https://github.com/PowerShell/xActiveDirectory | ||
.ICONURI | ||
.EXTERNALMODULEDEPENDENCIES | ||
.REQUIREDSCRIPTS | ||
.EXTERNALSCRIPTDEPENDENCIES | ||
.RELEASENOTES | ||
.PRIVATEDATA | ||
#> | ||
|
||
#Requires -module xActiveDirectory | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will add a Service Principal Name to a computer account. | ||
#> | ||
|
||
Configuration AddComputerServicePrincipalName_Config | ||
{ | ||
Import-DscResource -Module xActiveDirectory | ||
|
||
Node localhost | ||
{ | ||
xADServicePrincipalName 'web.contoso.com' | ||
{ | ||
ServicePrincipalName = 'HTTP/web.contoso.com' | ||
Account = 'IIS01$' | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
Examples/Resources/xWaitForADDomain/1-WaitForADDomain_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,39 @@ | ||
<#PSScriptInfo | ||
.VERSION 1.0 | ||
.GUID 5f105122-a318-46f4-a7e9-7dc745c57878 | ||
.AUTHOR Microsoft Corporation | ||
.COMPANYNAME Microsoft Corporation | ||
.COPYRIGHT (c) Microsoft Corporation. All rights reserved. | ||
.TAGS DSCConfiguration | ||
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE | ||
.PROJECTURI https://github.com/PowerShell/xActiveDirectory | ||
.ICONURI | ||
.EXTERNALMODULEDEPENDENCIES | ||
.REQUIREDSCRIPTS | ||
.EXTERNALSCRIPTDEPENDENCIES | ||
.RELEASENOTES | ||
.PRIVATEDATA | ||
#> | ||
|
||
#Requires -module xActiveDirectory | ||
|
||
<# | ||
.DESCRIPTION | ||
This configuration will wait for an AD Domain to respond before returning. | ||
#> | ||
|
||
Configuration WaitForADDomain_Config | ||
{ | ||
Import-DscResource -Module xActiveDirectory | ||
|
||
Node localhost | ||
{ | ||
xWaitForADDomain 'contoso.com' | ||
{ | ||
DomainName = 'contoso.com' | ||
RetryIntervalSec = 60 | ||
RetryCount = 10 | ||
RebootRetryCount = 1 | ||
} | ||
} | ||
} |