Skip to content

Commit

Permalink
Add SamAccountName property to ADUser
Browse files Browse the repository at this point in the history
Add SamAccountName property to allow setting the name of the user; this requires that the UserName property be specified with something other than the SamAccountName (e.g., the SID, DN, &c.).
  • Loading branch information
gaelicWizard committed May 20, 2021
1 parent 2811bc8 commit 1fe395a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/DSCResources/MSFT_ADUser/MSFT_ADUser.PropertyMap.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
UseCmdletParameter = $false
Array = $false
}
@{
Parameter = 'SamAccountName'
ADProperty = 'SamAccountName'
UseCmdletParameter = $true
Array = $false
}
@{
Parameter = 'Path'
ADProperty = 'distinguishedName'
Expand Down
1 change: 1 addition & 0 deletions source/DSCResources/MSFT_ADUser/MSFT_ADUser.schema.mof
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class MSFT_ADUser : OMI_BaseResource
[Write, Description("Specifies the common name assigned to the user account (ldapDisplayName 'cn'). If not specified the default value will be the same value provided in parameter UserName.")] String CommonName;
[Write, Description("Specifies the User Principal Name (UPN) assigned to the user account (ldapDisplayName 'userPrincipalName').")] String UserPrincipalName;
[Write, Description("Specifies the display name of the object (ldapDisplayName 'displayName').")] String DisplayName;
[Write, Description("Specifies the SamAccountName of the object (ldapDisplayName 'SamAccountName').")] String SamAccountName;
[Write, Description("Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.")] String Path;
[Write, Description("Specifies the user's given name (ldapDisplayName 'givenName').")] String GivenName;
[Write, Description("Specifies the initials that represent part of a user's name (ldapDisplayName 'initials').")] String Initials;
Expand Down

0 comments on commit 1fe395a

Please sign in to comment.