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

ADUser: Add additional properties #44

Closed
iainbrighton opened this issue Nov 12, 2015 · 12 comments · Fixed by #468
Closed

ADUser: Add additional properties #44

iainbrighton opened this issue Nov 12, 2015 · 12 comments · Fixed by #468
Labels
enhancement The issue is an enhancement request.

Comments

@iainbrighton
Copy link
Contributor

I would love to be able to set additional properties on xADUser resource, like department and phone numbers etc..

This would be great for our lab and demo setups! Any requests, before I get to work?

@HemantMahawar HemantMahawar added the enhancement The issue is an enhancement request. label Nov 16, 2015
@mattmcnabb
Copy link
Contributor

Iain,

I totally agree! I've done some extensive AD user automation in the last couple years and I have a new project coming up in this space. I have considered considered building what I have done out into a reusable framework for user automation. However, with DSC now in full swing I believe the AD resource could be this framework.

I've been thinking about how to go about this and would love to contribute as well. In my mind I'd like to be able to pull data in from SQL, CSV, etc. and build a table of users and attributes that can then be acted on. Maybe this table would go into ConfigurationData?

Ultimately I'd like to be able to set and attribute of a user, their group membership, modify attributes when necessary, and enable or disable when necessary. Does this sound too ambitious?

@iainbrighton
Copy link
Contributor Author

The pulling data from SQL and CSV would be done by a composite resource or via ConfigurationData (that's what I'm using for our training and lab environments). This resource is pretty much done, I'm just testing internally.

Here's the current syntax I have working and will push shortly:

xADUser [string] #ResourceName
{
    DomainName = [string]
    Password = [PSCredential]
    UserName = [string]
    [ City = [string] ]
    [ Company = [string] ]
    [ Country = [string] ]
    [ Department = [string] ]
    [ DependsOn = [string[]] ]
    [ Description = [string] ]
    [ DisplayName = [string] ]
    [ Division = [string] ]
    [ DomainAdministratorCredential = [PSCredential] ]
    [ DomainController = [string] ]
    [ EmailAddress = [string] ]
    [ EmployeeID = [string] ]
    [ EmployeeNumber = [string] ]
    [ Enabled = [bool] ]
    [ Ensure = [string] { Absent | Present }  ]
    [ Fax = [string] ]
    [ GivenName = [string] ]
    [ HomeDirectory = [string] ]
    [ HomeDrive = [string] ]
    [ HomePage = [string] ]
    [ HomePhone = [string] ]
    [ Initials = [string] ]
    [ JobTitle = [string] ]
    [ LogonScript = [string] ]
    [ Manager = [string] ]
    [ MobilePhone = [string] ]
    [ Notes = [string] ]
    [ Office = [string] ]
    [ OfficePhone = [string] ]
    [ PasswordNeverExpires = [bool] ]
    [ Path = [string] ]
    [ POBox = [string] ]
    [ PostalCode = [string] ]
    [ ProfilePath = [string] ]
    [ SamAccountName = [string] ]
    [ State = [string] ]
    [ StreetAddress = [string] ]
    [ Surname = [string] ]
    [ UserPrincipalName = [string] ]
}

As you can see it's a bit of a monster :)

iainbrighton added a commit to iainbrighton/xActiveDirectory that referenced this issue Nov 20, 2015
…y#11

Adds additional user property support and test coverage
@mattmcnabb
Copy link
Contributor

It is huge, but at the same time there is plenty more it could do, like Exchange attributes. That's what makes this a real challenge. Looks like your well on your way here, though! Hopefully we can mold this into something really flexible and usable.

Nice work, can't wait to see the PR!

@iainbrighton
Copy link
Contributor Author

@mattmcnabb - that sounds like you volunteering?! The PR has been submitted but has a merge conflict in the readme that requires someone to merge some existing PRs. You can always use this: https://github.com/iainbrighton/xActiveDirectory/commits/dev that has all those PRs in it..

@iainbrighton
Copy link
Contributor Author

Implemented in PR #49.

However, I need to implement setting a person's picture stored in AD. It can be added into the xADUser resource, but this is probably an edge-case. Therefore, should it be added to xADUser or put into a separate xADUserPicture resource? @TravisEz13 @HemantMahawar ?

@TravisEz13
Copy link
Contributor

If it's an optional property, I don't see a problem with keeping it in xADUser and when it is not assigned it doesn't affect the stability of the resource. Then again, I agree its probably not going to be used enough that a separate resource wouldn't be horrible and might even be prefered if when not assigned it will affect the stability of the resource. @HemantMahawar @BrucePay What do you think?

@iainbrighton
Copy link
Contributor Author

@TravisEz13 @HemantMahawar @BrucePay Any decision on this? I have implemented it here as I needed it for our lab environment. The thumbnail can either be specified as a file path to a .jpg or a Base64-encoded jpg.

I'm happy to add the contribution either to the xADUser resource or as a separate resource, but need to know what direction you want to take..

@kilasuit
Copy link

I agree that this thumbnail property should be added to xADUser

Re properties that are added as part of an AD Schema extension I think these properties should be in a new resource named along the lines of xADUserExtendedSchema as these aren't always going to be required so can be used or not used as needed

@iainbrighton
Copy link
Contributor Author

@TravisEz13 @HemantMahawar @BrucePay Are you in agreement with @kilasuit that this should be added to xADUser?

@johlju
Copy link
Member

johlju commented May 1, 2018

@iainbrighton Are you still able to work on this?

Can we just add this to the xADUser resource with requirement that it requires for example the 2008 Schema? If a future property needs xxxx schema, then that is a requirement to use the property, it doesn't stop the resource from functioning. It will just ignore fetch those properties that are not supported. Would that work?

If the remaining should not be done, then this issue can be closed since the main part of this issue was merged in PR #49.

@johlju johlju added the needs more information The issue needs more information from the author or the community. label May 1, 2018
@johlju johlju changed the title Additional xADUser properties xADUser: Add additional properties May 8, 2018
@albvar
Copy link

albvar commented Feb 1, 2019

Can we add ChangePasswordAtLogon to this as well?

@johlju johlju changed the title xADUser: Add additional properties ADUser: Add additional properties Jul 28, 2019
@johlju johlju added in progress The issue is being actively worked on by someone. and removed needs more information The issue needs more information from the author or the community. labels Aug 3, 2019
johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Aug 3, 2019
- Add new property `ThumbnailPhoto` and read-only property `ThumbnailPhotoHash` (issue dsccommunity#44).
@johlju
Copy link
Member

johlju commented Aug 3, 2019

I'm looking at fixing this issue by adding the ThumbnailPhoto property to ADUser. Continuing the work @iainbrighton started and reuses parts of the MIT licensed code he implemented in https://github.com/VirtualEngine/VirtualEngineLab/tree/master/DSCResources/VE_vADUserThumbnailPhoto. Have a working WIP just need to add unit test and integration test to it.

johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Aug 4, 2019
- Add new property `ThumbnailPhoto` and read-only property `ThumbnailPhotoHash` (issue dsccommunity#44).
johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Aug 4, 2019
- Add new property `ThumbnailPhoto` and read-only property `ThumbnailPhotoHash` (issue dsccommunity#44).
johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Aug 6, 2019
- Add new property `ThumbnailPhoto` and read-only property `ThumbnailPhotoHash` (issue dsccommunity#44).
johlju added a commit that referenced this issue Aug 6, 2019
- Changes to ADUser
  - Add new property `ThumbnailPhoto` and read-only property `ThumbnailPhotoHash` (issue #44).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants