You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
If an xADUser resource has the password property set, the password will be updated for the user account when any other property is changed.
Verbose logs showing the problem
Initial resource deploy:
ERBOSE: [MSTEST01]: LCM: [ Start Resource ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: LCM: [ Start Test ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Retrieving Active Directory user 'ExampleUser' ([email protected]) ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Active Directory user 'ExampleUser' ([email protected]) is present.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Creating connection to Active Directory domain 'contoso.com' ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Checking Active Directory user 'ExampleUser' password ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] User 'Password' property is NOT in the desired state. Expected '<Password>', actual '<Password>'.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] User 'Enabled' property is NOT in the desired state. Expected 'True', actual 'False'.
VERBOSE: [MSTEST01]: LCM: [ End Test ] [[xADUser]ExampleUser] in 9.6600 seconds.
VERBOSE: [MSTEST01]: LCM: [ Start Set ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Retrieving Active Directory user 'ExampleUser' ([email protected]) ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Active Directory user 'ExampleUser' ([email protected]) is present.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Setting Active Directory user password.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Updating user property 'Enabled' with/to 'True'.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Updating Active Directory user 'ExampleUser'.
VERBOSE: [MSTEST01]: LCM: [ End Set ] [[xADUser]ExampleUser] in 1.8810 seconds.
VERBOSE: [MSTEST01]: LCM: [ End Resource ] [[xADUser]ExampleUser]
Resource redeployed with no changes:
VERBOSE: [MSTEST01]: LCM: [ Start Resource ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: LCM: [ Start Test ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Retrieving Active Directory user 'ExampleUser' ([email protected]) ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Active Directory user 'ExampleUser' ([email protected]) is present.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Creating connection to Active Directory domain 'contoso.com' ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Checking Active Directory user 'ExampleUser' password ...
VERBOSE: [MSTEST01]: LCM: [ End Test ] [[xADUser]ExampleUser] in 7.3440 seconds.
VERBOSE: [MSTEST01]: LCM: [ Skip Set ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: LCM: [ End Resource ] [[xADUser]ExampleUser]
Resource redeployed after setting GivenName:
VERBOSE: [MSTEST01]: LCM: [ Start Resource ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: LCM: [ Start Test ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Retrieving Active Directory user 'ExampleUser' ([email protected]) ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Active Directory user 'ExampleUser' ([email protected]) is present.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Creating connection to Active Directory domain 'contoso.com' ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Checking Active Directory user 'ExampleUser' password ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] User 'GivenName' property is NOT in the desired state. Expected 'bob', actual ''.
VERBOSE: [MSTEST01]: LCM: [ End Test ] [[xADUser]ExampleUser] in 8.3370 seconds.
VERBOSE: [MSTEST01]: LCM: [ Start Set ] [[xADUser]ExampleUser]
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Retrieving Active Directory user 'ExampleUser' ([email protected]) ...
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Active Directory user 'ExampleUser' ([email protected]) is present.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Setting Active Directory user password.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Updating user property 'GivenName' with/to 'bob'.
VERBOSE: [MSTEST01]: [[xADUser]ExampleUser] Updating Active Directory user 'ExampleUser'.
VERBOSE: [MSTEST01]: LCM: [ End Set ] [[xADUser]ExampleUser] in 2.1260 seconds.
VERBOSE: [MSTEST01]: LCM: [ End Resource ] [[xADUser]ExampleUser]
Notice the Setting Active Directory user password. verbose message on the GivenName change redeploy.
Suggested solution to the issue
Add a call to Test-Password in the Set-TargetResource function.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
If an
xADUser
resource has thepassword
property set, the password will be updated for the user account when any other property is changed.Verbose logs showing the problem
Initial resource deploy:
Resource redeployed with no changes:
Resource redeployed after setting
GivenName
:Notice the
Setting Active Directory user password.
verbose message on theGivenName
change redeploy.Suggested solution to the issue
Add a call to
Test-Password
in theSet-TargetResource
function.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: