From d8f5a34d85957ba2d51bd16306359c8fcad4389f Mon Sep 17 00:00:00 2001 From: Chris Church Date: Wed, 22 Jul 2015 03:14:20 -0400 Subject: [PATCH] Save user after creating before trying to read/set other properties. Fixes #1241 --- lib/ansible/modules/windows/win_user.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/windows/win_user.ps1 b/lib/ansible/modules/windows/win_user.ps1 index ae4847a8528..b7be7e4eea3 100644 --- a/lib/ansible/modules/windows/win_user.ps1 +++ b/lib/ansible/modules/windows/win_user.ps1 @@ -146,6 +146,7 @@ If ($state -eq 'present') { If ($password -ne $null) { $user_obj.SetPassword($password) } + $user_obj.SetInfo() $result.changed = $true } ElseIf (($password -ne $null) -and ($update_password -eq 'always')) {