From 3b13ea60248a5859aff746e40721cf9d094bdb1a Mon Sep 17 00:00:00 2001 From: Craig Benner Date: Mon, 19 Jun 2017 11:01:52 -0400 Subject: [PATCH] Enabling Account that is created in ONEForest Role --- roles/ONEForest/library/ONEForest_Config.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/ONEForest/library/ONEForest_Config.ps1 b/roles/ONEForest/library/ONEForest_Config.ps1 index f7033ac..7128f57 100644 --- a/roles/ONEForest/library/ONEForest_Config.ps1 +++ b/roles/ONEForest/library/ONEForest_Config.ps1 @@ -26,8 +26,9 @@ function createUser([String]$inUserName, [String]$inDN, [String]$inPassword) { $user = Get-ADUser -filter {name -eq $inUserName} if ($user.Name -ne $inUserName) { - $securePassword = ConvertTo-SecureString $inPassword -AsPlainText -Force + $securePassword = ConvertTo-SecureString $inPassword -AsPlainText -Force New-ADUser $inUserName -Path $inDN -AccountPassword $securePassword + Enable-ADAccount $inUserName } } @@ -125,4 +126,4 @@ catch { - \ No newline at end of file + -- GitLab