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

BREAKING CHANGE: Rename module to ActiveDirectoryDsc #447

Merged
merged 8 commits into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
54 changes: 27 additions & 27 deletions xActiveDirectory.psd1 → ActiveDirectoryDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'The xActiveDirectory module is originally part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module contains the xADDomain, xADDomainController, xADUser, and xWaitForDomain resources. These DSC Resources allow you to configure and manage Active Directory.
Description = 'The ActiveDirectoryDsc module is originally part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module contains the ADDomain, ADDomainController, ADUser, and xWaitForDomain resources. These DSC Resources allow you to configure and manage Active Directory.

All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service.'

Expand All @@ -40,16 +40,16 @@ PrivateData = @{
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE'
LicenseUri = 'https://github.com/PowerShell/ActiveDirectoryDsc/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/PowerShell/xActiveDirectory'
ProjectUri = 'https://github.com/PowerShell/ActiveDirectoryDsc'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '- Changes to xActiveDirectory
ReleaseNotes = '- Changes to ActiveDirectoryDsc
- Added new helper functions in xADCommon, see each functions comment-based
help for more information.
- Convert-PropertyMapToObjectProperties
Expand All @@ -61,16 +61,16 @@ PrivateData = @{
- Common Tests - Custom Script Analyzer Rules
- Common Tests - Required Script Analyzer Rules
- Common Tests - Flagged Script Analyzer Rules
- Common Tests - Validate Module Files ([issue 282](https://github.com/PowerShell/xActiveDirectory/issues/282))
- Common Tests - Validate Script Files ([issue 283](https://github.com/PowerShell/xActiveDirectory/issues/283))
- Common Tests - Relative Path Length ([issue 284](https://github.com/PowerShell/xActiveDirectory/issues/284))
- Common Tests - Validate Markdown Links ([issue 280](https://github.com/PowerShell/xActiveDirectory/issues/280))
- Common Tests - Validate Localization ([issue 281](https://github.com/PowerShell/xActiveDirectory/issues/281))
- Common Tests - Validate Example Files ([issue 279](https://github.com/PowerShell/xActiveDirectory/issues/279))
- Common Tests - Validate Example Files To Be Published ([issue 311](https://github.com/PowerShell/xActiveDirectory/issues/311))
- Move resource descriptions to Wiki using auto-documentation ([issue 289](https://github.com/PowerShell/xActiveDirectory/issues/289))
- Common Tests - Validate Module Files ([issue 282](https://github.com/PowerShell/ActiveDirectoryDsc/issues/282))
- Common Tests - Validate Script Files ([issue 283](https://github.com/PowerShell/ActiveDirectoryDsc/issues/283))
- Common Tests - Relative Path Length ([issue 284](https://github.com/PowerShell/ActiveDirectoryDsc/issues/284))
- Common Tests - Validate Markdown Links ([issue 280](https://github.com/PowerShell/ActiveDirectoryDsc/issues/280))
- Common Tests - Validate Localization ([issue 281](https://github.com/PowerShell/ActiveDirectoryDsc/issues/281))
- Common Tests - Validate Example Files ([issue 279](https://github.com/PowerShell/ActiveDirectoryDsc/issues/279))
- Common Tests - Validate Example Files To Be Published ([issue 311](https://github.com/PowerShell/ActiveDirectoryDsc/issues/311))
- Move resource descriptions to Wiki using auto-documentation ([issue 289](https://github.com/PowerShell/ActiveDirectoryDsc/issues/289))
- Move helper functions from MSFT_xADCommon to the module
xActiveDirectory.Common ([issue 288](https://github.com/PowerShell/xActiveDirectory/issues/288)).
ActiveDirectoryDsc.Common ([issue 288](https://github.com/PowerShell/ActiveDirectoryDsc/issues/288)).
- Removed helper function `Test-ADDomain` since it was not used. The
helper function had design flaws too.
- Now the helper function `Test-Members` outputs all the members that
Expand All @@ -83,13 +83,13 @@ PrivateData = @{
xADComputer.
- Cleanup of code
- Removed semicolon throughout where it is not needed.
- Migrate tests to Pester syntax v4.x ([issue 322](https://github.com/PowerShell/xActiveDirectory/issues/322)).
- Migrate tests to Pester syntax v4.x ([issue 322](https://github.com/PowerShell/ActiveDirectoryDsc/issues/322)).
- Removed `-MockWith {}` in unit tests.
- Use fully qualified type names for parameters and variables
([issue 374](https://github.com/PowerShell/xActiveDirectory/issues/374)).
([issue 374](https://github.com/PowerShell/ActiveDirectoryDsc/issues/374)).
- Removed unused legacy test files from the root of the repository.
- Updated Example List README with missing resources.
- Added missing examples for xADReplicationSubnet, xADServicePrincipalName and xWaitForADDomain. ([issue 395](https://github.com/PowerShell/xActiveDirectory/issues/395)).
- Added missing examples for xADReplicationSubnet, xADServicePrincipalName and xWaitForADDomain. ([issue 395](https://github.com/PowerShell/ActiveDirectoryDsc/issues/395)).
- Changes to xADComputer
- Refactored the resource and the unit tests.
- BREAKING CHANGE: The `Enabled` property is **DEPRECATED** and is no
Expand All @@ -106,8 +106,8 @@ PrivateData = @{
- Moved examples from the README.md to separate example files in the
Examples folder.
- Fix the RestoreFromRecycleBin description.
- Fix unnecessary cast in `Test-TargetResource` ([issue 295](https://github.com/PowerShell/xActiveDirectory/issues/295)).
- Fix ServicePrincipalNames property empty string exception ([issue 382](https://github.com/PowerShell/xActiveDirectory/issues/382)).
- Fix unnecessary cast in `Test-TargetResource` ([issue 295](https://github.com/PowerShell/ActiveDirectoryDsc/issues/295)).
- Fix ServicePrincipalNames property empty string exception ([issue 382](https://github.com/PowerShell/ActiveDirectoryDsc/issues/382)).
- Changes to xADGroup
- Change the description of the property RestoreFromRecycleBin.
- Code cleanup.
Expand All @@ -119,11 +119,11 @@ PrivateData = @{
- Changes to xADOrganizationalUnit
- Change the description of the property RestoreFromRecycleBin.
- Code cleanup.
- Fix incorrect verbose message when this resource has Ensure set to Absent ([issue 276](https://github.com/PowerShell/xActiveDirectory/issues/276)).
- Fix incorrect verbose message when this resource has Ensure set to Absent ([issue 276](https://github.com/PowerShell/ActiveDirectoryDsc/issues/276)).
- Changes to xADUser
- Change the description of the property RestoreFromRecycleBin.
- Added ServicePrincipalNames property ([issue 153](https://github.com/PowerShell/xActiveDirectory/issues/153)).
- Added ChangePasswordAtLogon property ([issue 246](https://github.com/PowerShell/xActiveDirectory/issues/246)).
- Added ServicePrincipalNames property ([issue 153](https://github.com/PowerShell/ActiveDirectoryDsc/issues/153)).
- Added ChangePasswordAtLogon property ([issue 246](https://github.com/PowerShell/ActiveDirectoryDsc/issues/246)).
- Code cleanup.
- Added LogonWorkstations property
- Added Organization property
Expand All @@ -133,10 +133,10 @@ PrivateData = @{
- Added CompoundIdentitySupported property
- Added PasswordNotRequired property
- Added SmartcardLogonRequired property
- Added ProxyAddresses property ([Issue 254](https://github.com/PowerShell/xActiveDirectory/issues/254)).
- Added ProxyAddresses property ([Issue 254](https://github.com/PowerShell/ActiveDirectoryDsc/issues/254)).
- Fix Password property being updated whenever another property is changed
([issue 384](https://github.com/PowerShell/xActiveDirectory/issues/384)).
- Replace Write-Error with the correct helper function ([Issue 331](https://github.com/PowerShell/xActiveDirectory/issues/331)).
([issue 384](https://github.com/PowerShell/ActiveDirectoryDsc/issues/384)).
- Replace Write-Error with the correct helper function ([Issue 331](https://github.com/PowerShell/ActiveDirectoryDsc/issues/331)).
- Changes to xADDomainController
- Change the `Requires` statement in the Examples to require the correct
module.
Expand All @@ -156,15 +156,15 @@ PrivateData = @{
- Suppressing the Script Analyzer rule `PSAvoidGlobalVars` since the
resource is using the `$global:DSCMachineStatus` variable to trigger
a reboot.
- Added missing property schema descriptions ([issue 369](https://github.com/PowerShell/xActiveDirectory/issues/369)).
- Added missing property schema descriptions ([issue 369](https://github.com/PowerShell/ActiveDirectoryDsc/issues/369)).
- Code cleanup.
- Changes to xADRecycleBin
- Remove unneeded example and resource designer files.
- Added missing property schema descriptions ([issue 368](https://github.com/PowerShell/xActiveDirectory/issues/368)).
- Added missing property schema descriptions ([issue 368](https://github.com/PowerShell/ActiveDirectoryDsc/issues/368)).
- Code cleanup.
- It now sets back the `$ErrorActionPreference` that was set prior to
setting it to `"Stop"`.
- Replace Write-Error with the correct helper function ([issue 327](https://github.com/PowerShell/xActiveDirectory/issues/327)).
- Replace Write-Error with the correct helper function ([issue 327](https://github.com/PowerShell/ActiveDirectoryDsc/issues/327)).
- Changes to xADReplicationSiteLink
- Fix ADIdentityNotFoundException when creating a new site link.
- Code cleanup.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$script:resourceModulePath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
$script:modulesFolderPath = Join-Path -Path $script:resourceModulePath -ChildPath 'Modules'

$script:localizationModulePath = Join-Path -Path $script:modulesFolderPath -ChildPath 'xActiveDirectory.Common'
Import-Module -Name (Join-Path -Path $script:localizationModulePath -ChildPath 'xActiveDirectory.Common.psm1')
$script:localizationModulePath = Join-Path -Path $script:modulesFolderPath -ChildPath 'ActiveDirectoryDsc.Common'
Import-Module -Name (Join-Path -Path $script:localizationModulePath -ChildPath 'ActiveDirectoryDsc.Common.psm1')

$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xADComputer'
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_ADComputer'

<#
A property map that maps the resource parameters to the corresponding
Expand Down Expand Up @@ -79,7 +79,7 @@ $script:computerObjectPropertyMap = @(
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 xADObjectEnabledState.
property `Enabled` see the resource ADObjectEnabledState.

.PARAMETER DomainController
Specifies the Active Directory Domain Services instance to connect to perform the task.
Expand Down Expand Up @@ -301,7 +301,7 @@ function Get-TargetResource
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 xADObjectEnabledState.
property `Enabled` see the resource ADObjectEnabledState.
#>
function Test-TargetResource
{
Expand Down Expand Up @@ -563,7 +563,7 @@ function Test-TargetResource
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 xADObjectEnabledState.
property `Enabled` see the resource ADObjectEnabledState.
#>
function Set-TargetResource
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ClassVersion("1.0.0.0"), FriendlyName("xADComputer")]
class MSFT_xADComputer : OMI_BaseResource
[ClassVersion("1.0.0.0"), FriendlyName("ADComputer")]
class MSFT_ADComputer : OMI_BaseResource
{
[Key, Description("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.")] String ComputerName;
[Write, Description("Specifies the location of the computer, such as an office number.")] String Location;
Expand All @@ -9,14 +9,14 @@ class MSFT_xADComputer : OMI_BaseResource
[Write, Description("Specifies the display name of the computer account.")] String DisplayName;
[Write, Description("Specifies the X.500 path of the Organizational Unit (OU) or container where the computer is located.")] String Path;
[Write, Description("Specifies a description of the computer account.")] String Description;
[Write, Description("DEPRECATED - DO NOT USE. Please see the parameter EnabledOnCreation in this resource, and the resource xADObjectEnabledState on how to enforce the Enabled property. This parameter no longer sets or enforces the Enabled property. If this parameter is used then a warning message will be outputted saying that the Enabled parameter has been deprecated.")] Boolean Enabled;
[Write, Description("DEPRECATED - DO NOT USE. Please see the parameter EnabledOnCreation in this resource, and the resource ADObjectEnabledState on how to enforce the Enabled property. This parameter no longer sets or enforces the Enabled property. If this parameter is used then a warning message will be outputted saying that the Enabled parameter has been deprecated.")] Boolean Enabled;
[Write, Description("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.")] String Manager;
[Write, Description("Specifies the Active Directory Domain Services instance to connect to perform the task.")] String DomainController;
[Write, Description("Specifies the user account credentials to use to perform the task."), EmbeddedInstance("MSFT_Credential")] String DomainAdministratorCredential;
[Write, Description("Specifies the full path to the Offline Domain Join Request file to create.")] String RequestFile;
[Write, Description("Specifies whether the computer account is present or absent. Default value is 'Present'."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
[Write, Description("Try to restore the computer account from the recycle bin before creating a new one.")] Boolean RestoreFromRecycleBin;
[Write, Description("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 xADObjectEnabledState.")] Boolean EnabledOnCreation;
[Write, Description("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.")] Boolean EnabledOnCreation;
[Read, Description("Returns the X.500 path of the computer object.")] String DistinguishedName;
[Read, Description("Returns the security identifier of the computer object.")] String SID;
[Read, Description("Returns the security identifier of the computer object.")] String SamAccountName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

The xADComputer DSC resource will manage computer accounts within Active Directory.
The ADComputer DSC resource will manage computer accounts within Active Directory.
This resource can be used to provision a computer account before the computer is
added to the domain. These pre-created computer objects can be used with offline
domain join, unsecure domain Join and RODC domain join scenarios.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# culture="en-US"
ConvertFrom-StringData @'
EnabledDeprecatedMessage = DEPRECATED parameter Enabled is being used in this configuration. The parameter Enabled no longer sets or enforces the Enabled property. Please see more information at https://github.com/PowerShell/xActiveDirectory/blob/master/README.md#xadcomputer. (ADC0001)
EnabledDeprecatedMessage = DEPRECATED parameter Enabled is being used in this configuration. The parameter Enabled no longer sets or enforces the Enabled property. Please see more information at https://github.com/PowerShell/ActiveDirectoryDsc/blob/master/README.md#Adcomputer. (ADC0001)
RetrievingComputerAccount = Retrieving the information about the computer account '{0}' from Active Directory. (ADC0002)
ComputerAccountIsPresent = The computer account '{0}' is present in Active Directory. (ADC0003)
ComputerAccountIsAbsent = The computer account '{0}' is absent from Active Directory. (ADC0004)
Expand Down
Loading