Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xWaitForADDomain: Fix Issue #341 #435

Merged
merged 5 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
- Added unit tests ([issue #324](https://github.com/PowerShell/xActiveDirectory/issues/324)).
- Added comment-based help ([issue #337](https://github.com/PowerShell/xActiveDirectory/issues/337)).
- Added integration tests ([issue #348](https://github.com/PowerShell/xActiveDirectory/issues/348)).
- Changes to xWaitForADDomain
- Added comment-based help ([issue #341](https://github.com/PowerShell/xActiveDirectory/issues/341))

## 3.0.0.0

Expand Down
74 changes: 74 additions & 0 deletions DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,33 @@ Import-Module -Name (Join-Path -Path $script:localizationModulePath -ChildPath '

$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xWaitForADDomain'

<#
.SYNOPSIS
Gets the current state of the specified Active Directory to see if it
is available.

.PARAMETER DomainName
The name of the Active Directory domain to wait for.

.PARAMETER DomainUserCredential
The user account credentials to use to perform this task.

.PARAMETER RetryIntervalSec
The interval in seconds between retry attempts. Default value is 60.

.PARAMETER RetryCount
The number of retries before failing. Default value is 10.

.PARAMETER RebootRetryCount
The number of times to reboot after failing and then restart retrying.
Default value is 0 (zero).
#>
function Get-TargetResource
{
[OutputType([System.Collections.Hashtable])]
param
(

[Parameter(Mandatory = $true)]
[System.String]
$DomainName,
Expand Down Expand Up @@ -57,6 +79,27 @@ function Get-TargetResource
}
}

<#
.SYNOPSIS
Sets the current state of the specified Active Directory to see if a
reboot is required.

.PARAMETER DomainName
The name of the Active Directory domain to wait for.

.PARAMETER DomainUserCredential
The user account credentials to use to perform this task.

.PARAMETER RetryIntervalSec
The interval in seconds between retry attempts. Default value is 60.

.PARAMETER RetryCount
The number of retries before failing. Default value is 10.

.PARAMETER RebootRetryCount
The number of times to reboot after failing and then restart retrying.
Default value is 0 (zero).
#>
function Set-TargetResource
{
<#
Expand Down Expand Up @@ -147,6 +190,27 @@ function Set-TargetResource
}
}

<#
.SYNOPSIS
Tests the current state of the specified Active Directory to see if it
is available.

.PARAMETER DomainName
The name of the Active Directory domain to wait for.

.PARAMETER DomainUserCredential
The user account credentials to use to perform this task.

.PARAMETER RetryIntervalSec
The interval in seconds between retry attempts. Default value is 60.

.PARAMETER RetryCount
The number of retries before failing. Default value is 10.

.PARAMETER RebootRetryCount
The number of times to reboot after failing and then restart retrying.
Default value is 0 (zero).
#>
function Test-TargetResource
{
[OutputType([System.Boolean])]
Expand Down Expand Up @@ -196,6 +260,16 @@ function Test-TargetResource
}
}

<#
.SYNOPSIS
Gets the specified Active Directory domain

.PARAMETER DomainName
The name of the Active Directory domain to wait for.

.PARAMETER DomainUserCredential
The user account credentials to use to perform this task.
#>
function Get-Domain
{
[OutputType([PSObject])]
Expand Down