-
Notifications
You must be signed in to change notification settings - Fork 141
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
ADManagedServiceAccount: add SamAccountName parameter #659
Open
gaelicWizard
wants to merge
3
commits into
dsccommunity:main
Choose a base branch
from
gaelicWizard:ADManagedServiceAccountSamAccountName
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,7 @@ $script:errorCodeKdsRootKeyNotFound = -2146893811 | |
Returns the current state of an Active Directory managed service account. | ||
|
||
.PARAMETER ServiceAccountName | ||
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName | ||
'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 20 characters | ||
or less. Once created, the user's SamAccountName and CN cannot be changed. | ||
Specifies the name of the object. This parameter sets the Name property of the Active Directory object. The LDAP Display Name (ldapDisplayName) of this property is 'name'. Once created, the account's Name cannot be changed. Once created, the user's SamAccountName and CN cannot be changed. | ||
|
||
.PARAMETER AccountType | ||
The type of managed service account. Standalone will create a Standalone Managed Service Account (sMSA) and | ||
|
@@ -92,6 +90,7 @@ function Get-TargetResource | |
'DistinguishedName' | ||
'Description' | ||
'DisplayName' | ||
'SamAccountName' | ||
'ObjectClass' | ||
'Enabled' | ||
'PrincipalsAllowedToRetrieveManagedPassword' | ||
|
@@ -154,6 +153,7 @@ function Get-TargetResource | |
Path = Get-ADObjectParentDN -DN $adServiceAccount.DistinguishedName | ||
Description = $adServiceAccount.Description | ||
DisplayName = $adServiceAccount.DisplayName | ||
SamAccountName = $adServiceAccount.SamAccountName | ||
DistinguishedName = $adServiceAccount.DistinguishedName | ||
Enabled = $adServiceAccount.Enabled | ||
KerberosEncryptionType = $adServiceAccount.KerberosEncryptionType -split (', ') | ||
|
@@ -171,6 +171,7 @@ function Get-TargetResource | |
Path = $null | ||
Description = $null | ||
DisplayName = $null | ||
SamAccountName = $null | ||
DistinguishedName = $null | ||
Enabled = $false | ||
KerberosEncryptionType = @() | ||
|
@@ -188,9 +189,7 @@ function Get-TargetResource | |
Tests if an Active Directory managed service account is in the desired state. | ||
|
||
.PARAMETER ServiceAccountName | ||
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName | ||
'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 20 | ||
characters or less. Once created, the user's SamAccountName and CN cannot be changed. | ||
Specifies the name of the object. This parameter sets the Name property of the Active Directory object. The LDAP Display Name (ldapDisplayName) of this property is 'name'. Once created, the account's Name cannot be changed. Once created, the user's SamAccountName and CN cannot be changed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add line breaks around 120 characters |
||
|
||
.PARAMETER AccountType | ||
The type of managed service account. Standalone will create a Standalone Managed Service Account (sMSA) and | ||
|
@@ -206,6 +205,11 @@ function Get-TargetResource | |
.PARAMETER DisplayName | ||
Specifies the display name of the account (ldapDisplayName 'displayName'). | ||
|
||
.PARAMETER SamAccountName | ||
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName | ||
'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 20 | ||
characters or less. | ||
|
||
.PARAMETER DomainController | ||
Specifies the Active Directory Domain Controller instance to use to perform the task. | ||
This is only required if not executing the task on a domain controller. | ||
|
@@ -268,6 +272,11 @@ function Test-TargetResource | |
[System.String] | ||
$DisplayName, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.String] | ||
$SamAccountName, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.String] | ||
|
@@ -375,9 +384,7 @@ function Test-TargetResource | |
Sets the state of an Active Directory managed service account. | ||
|
||
.PARAMETER ServiceAccountName | ||
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName | ||
'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 20 | ||
characters or less. Once created, the user's SamAccountName and CN cannot be changed. | ||
Specifies the name of the object. This parameter sets the Name property of the Active Directory object. The LDAP Display Name (ldapDisplayName) of this property is 'name'. Once created, the account's Name cannot be changed. Once created, the user's SamAccountName and CN cannot be changed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add line breaks around 120 characters |
||
|
||
.PARAMETER AccountType | ||
The type of managed service account. Standalone will create a Standalone Managed Service Account (sMSA) and | ||
|
@@ -393,6 +400,11 @@ function Test-TargetResource | |
.PARAMETER DisplayName | ||
Specifies the display name of the account (ldapDisplayName 'displayName'). | ||
|
||
.PARAMETER SamAccountName | ||
Specifies the Security Account Manager (SAM) account name of the managed service account (ldapDisplayName | ||
'sAMAccountName'). To be compatible with older operating systems, create a SAM account name that is 20 | ||
characters or less. | ||
|
||
.PARAMETER DomainController | ||
Specifies the Active Directory Domain Controller instance to use to perform the task. | ||
This is only required if not executing the task on a domain controller. | ||
|
@@ -463,6 +475,11 @@ function Set-TargetResource | |
[System.String] | ||
$DisplayName, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.String] | ||
$SamAccountName, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.String] | ||
|
3 changes: 2 additions & 1 deletion
3
source/DSCResources/MSFT_ADManagedServiceAccount/MSFT_ADManagedServiceAccount.schema.mof
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add line breaks around 120 characters